Skip to content

Commit

Permalink
Merge pull request #9071 from corbinSanders/feature/ENG_49_forgot_pas…
Browse files Browse the repository at this point in the history
…sword_redirect

Reset Password page breaks login page[ENG-49]
  • Loading branch information
pattisdr authored Aug 20, 2019
2 parents 2fc95bf + 7952a31 commit c8fcccf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion framework/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,13 @@ def reset_password_get(auth, uid=None, token=None):
user_obj.verification_key_v2 = generate_verification_key(verification_type='password')
user_obj.save()

#override routes.py login_url to redirect to dashboard
service_url = web_url_for('dashboard', _absolute=True)

return {
'uid': user_obj._id,
'token': user_obj.verification_key_v2['token'],
'login_url': service_url,
}


Expand Down Expand Up @@ -138,7 +142,11 @@ def forgot_password_get(auth):
if auth.logged_in:
return auth_logout(redirect_url=request.url)

return {}
#overriding the routes.py sign in url to redirect to the dashboard after login
context = {}
context['login_url'] = web_url_for('dashboard', _absolute=True)

return context


def forgot_password_post():
Expand Down

0 comments on commit c8fcccf

Please sign in to comment.