@PitaJ said in Custom Pages, and Recend Cards problem.:
@Michael-Pfaff just FYI it is a widget now. I don't know how you have it set up, but that may be what changed.
That was it! Thanks.
https://github.com/NodeBB/NodeBB/blob/master/src/routes/authentication.js#L65
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
and controllers.authentication.login
?
https://github.com/NodeBB/nodebb-theme-persona/blob/master/templates/register.tpl#L27
<input class="form-control" type="text" placeholder="[[register:username_placeholder]]" name="username"
id="username" autocorrect="off" autocapitalize="off" autocomplete="off" />
https://github.com/NodeBB/nodebb-theme-persona/blob/master/templates/register.tpl#L39
<input class="form-control" type="password" placeholder="[[register:password_placeholder]]" name="password"
id="password" />
...same attributes at login
https://github.com/NodeBB/nodebb-theme-persona/blob/master/templates/login.tpl#L17
<input class="form-control" type="text" placeholder="{allowLoginWith}" name="username" id="username"
autocorrect="off" autocapitalize="off" />
https://github.com/NodeBB/nodebb-theme-persona/blob/master/templates/login.tpl#L23
<input class="form-control" type="password" placeholder="[[user:password]]" name="password"
id="password" />
I tried to rename the registration attributes on name="newusername"
and name="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.
Registration and login are both handled as an XHR on the client side. That's why both routes are just POST routes.
You'll want to investigate how the request is made, and mimic it with the new fields
@julian said:
You'll want to investigate how the request is made, and mimic it with the new fields
Yes.