Authorization and registration on the one page
-
- I had a problem when creating a authorization and registration on the one page:
NodeBB/src/routes/authentication.js at master · NodeBB/NodeBB
Node.js based forum software built for the modern web - NodeBB/src/routes/authentication.js at master · NodeBB/NodeBB
GitHub (github.com)
router.post('/register', Auth.middleware.applyCSRF, Auth.middleware.applyBlacklist, controllers.authentication.register);
router.post('/login', Auth.middleware.applyCSRF, Auth.middleware.applyBlacklist, controllers.authentication.login);
router.post('/logout', Auth.middleware.applyCSRF, controllers.authentication.logout);
How specify a one url for
controllers.authentication.register
andcontrollers.authentication.login
?
- The second problem was with the attribute username and password:
File not found · NodeBB/nodebb-theme-persona
Persona - A modern and responsive NodeBB theme. Contribute to NodeBB/nodebb-theme-persona development by creating an account on GitHub.
GitHub (github.com)
<input class="form-control" type="text" placeholder="[[register:username_placeholder]]"
name="username"
id="username" autocorrect="off" autocapitalize="off" autocomplete="off" />File not found · NodeBB/nodebb-theme-persona
Persona - A modern and responsive NodeBB theme. Contribute to NodeBB/nodebb-theme-persona development by creating an account on GitHub.
GitHub (github.com)
<input class="form-control" type="password" placeholder="[[register:password_placeholder]]"
name="password"
id="password" />...same attributes at login
File not found · NodeBB/nodebb-theme-persona
Persona - A modern and responsive NodeBB theme. Contribute to NodeBB/nodebb-theme-persona development by creating an account on GitHub.
GitHub (github.com)
<input class="form-control" type="text" placeholder="{allowLoginWith}" name="username"
id="username"
autocorrect="off" autocapitalize="off" />File not found · NodeBB/nodebb-theme-persona
Persona - A modern and responsive NodeBB theme. Contribute to NodeBB/nodebb-theme-persona development by creating an account on GitHub.
GitHub (github.com)
<input class="form-control" type="password" placeholder="[[user:password]]"
name="password"
id="password" />I tried to rename the registration attributes on
name="newusername"
andname="newpassword"
so that they do not conflict with each other, but registration has stopped working.
If this is not done, then the registration will be available through the authorization form.