Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Password Reset #355

Merged
merged 6 commits into from
Mar 2, 2016
Merged

Password Reset #355

merged 6 commits into from
Mar 2, 2016

Conversation

Ommy
Copy link
Contributor

@Ommy Ommy commented Feb 29, 2016

Backend and frontend for password reset using redis.

@Trinovantes
Copy link
Member

Closes #44

@Ommy Ommy changed the title [WIP] Password Reset Password Reset Mar 1, 2016
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
@Ommy Ommy force-pushed the fasih/password-reset branch from 66f690d to 3318ea9 Compare March 1, 2016 19:37
Ommy added 2 commits March 1, 2016 14:47
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?".
@Ommy Ommy force-pushed the fasih/password-reset branch from 3318ea9 to da59824 Compare March 1, 2016 19:47
let SignupView = require('views/auth/signupView');
let LoginView = require('views/auth/loginView');
let SettingsView = require('views/auth/settingsView');
let App = require('utils/sanaAppInstance');
Copy link
Member

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Ommy added 2 commits March 1, 2016 16:03
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.
@Ommy Ommy force-pushed the fasih/password-reset branch from f9e7278 to 0b0571d Compare March 1, 2016 22:22
},

events: {
'submit': 'onSubmit',
Copy link
Member

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

Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Trinovantes
Copy link
Member

+1

@joshkalpin
Copy link
Member

+1


module.exports = Marionette.ItemView.extend({

initialize: function(reset_token) {
Copy link
Member

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)?

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k 👍

@connorcimowsky
Copy link
Member

lgtm

Ommy added a commit that referenced this pull request Mar 2, 2016
@Ommy Ommy merged commit 18bcf14 into master Mar 2, 2016
@Ommy Ommy deleted the fasih/password-reset branch March 2, 2016 18:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants