-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
Closes #44 |
There are now two URLs, one that generates the token and stores it on redis, and then emails the user with the reset link. The other confirms the token from the params passed from the frontend and changes the user's password. The frontend component still needs to be done
66f690d
to
3318ea9
Compare
The endpoints are set up now to receive the appropriate keys from the frontent. Field validation also done, and returns JsonResponses. Tests updated to include mocking as key to cache was changed from email to token.
The frontend includes two routes, which are the passwordreset and passwordresetcomplete. Password reset is linked to the login page with the text "Forgot your password?".
3318ea9
to
da59824
Compare
let SignupView = require('views/auth/signupView'); | ||
let LoginView = require('views/auth/loginView'); | ||
let SettingsView = require('views/auth/settingsView'); | ||
let App = require('utils/sanaAppInstance'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use const
for importing (I didn't want to touch every file when I made the convention switch)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Removed param fetcher helper method and used Backbone's router to get param variables from the URL. Also changed all lets to const in requires. Other small CR nits.
f9e7278
to
0b0571d
Compare
}, | ||
|
||
events: { | ||
'submit': 'onSubmit', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this should be form:submit, correct? @Trinovantes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm more surprised that this event even triggered. I did not know the form event can propagate up the DOM tree.
Should change it to @ui.form submit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 |
+1 |
|
||
module.exports = Marionette.ItemView.extend({ | ||
|
||
initialize: function(reset_token) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think we usually put initialize
after the other definitions (in this case, template
, ui
, and events
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no real convention but initialize
at the beginning makes more sense. It is also how objects are defined on Backbone's site.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k 👍
lgtm |
Backend and frontend for password reset using redis.