Change login method and page
-
How do I change the login page and the method of login? I've found the point where the password verification happens. I guess I can implement my custom login over there but there would other implications from this as well, right? Also I want to change the login page with the field name changes. It will not use a "password" field but a signing key field. I have decided to make a fork of NodeBB with these custom pages for my forum.
-
@avinash-upadhyaya the preferred way of changing functionality is with a plugin that connects to hooks.
Here are some relevant hooks: https://github.com/NodeBB/NodeBB/wiki/Hooks#controllersauthentication
You can override the login page template to change the names of those fields.
-
@pitaj I would not be storing the password in the database. I just want to store the username(Account Number in my case) and use a third party to authenticate using the Account Number and Signing Key(password) provided during login. The same changed would be reflected in the registration as well i.e no password, just an account number and signing key. Sorry, I am new to NodeBB and please forgive me if I haven't explored much.
-
@avinash-upadhyaya I'm fairly certain what you're describing is possible to do with a plugin.
-
@avinash-upadhyaya the session sharing plugin may be a good place to start
GitHub - julianlam/nodebb-plugin-session-sharing: Allows login sessions from your app to persist in NodeBB
Allows login sessions from your app to persist in NodeBB - julianlam/nodebb-plugin-session-sharing
GitHub (github.com)