ember.js - Sails/Waterlock password reset flow -
g'day all,
does have experience waterlock flow passsword resets? i've hit wall can see work-around for, seems in-elegant, i'm missing something.
when send through auth/reset post email element, system proceeds shoot email out planned.
when submit received link in post request, password element, see "404" response.
however
if submit link request first, , submit post works.
when waterlock-local-auth source, reset post action testing presence of decrypted token in request object before allowing proceed.
so
either code front end send request (which doesn't respond properly) , resubmit post, or go in , hack waterlock-local-auth code include decode of token (which i'm thinking elegant solution).
any clues?
thanks,
andy
i have got similar problem, use angularjs frontend. discussion thread helpful:
https://github.com/waterlock/waterlock-local-auth/issues/7
basically, expected submit request url received in password reset email. after click link token, find in database new resettoken record has been created , value in token column 1 see in url. should redirected forwardurl
in waterlock.js setting, there should form or can make post to:
http://yourdomain.com/auth/reset?password=newpassword
then password reset , resettoken record removed database.
if @ handlepost
function here:
https://github.com/waterlock/waterlock-local-auth/blob/master/lib/controllers/actions/reset.js#l68
this can explain why posting url sent in reset password email returns 404. resettoken
must exist in session in order issuepasswordreset
invoked. , place set req.session.resettoken
within validatetoken
method:
https://github.com/waterlock/waterlock-local-auth/blob/master/lib/controllers/actions/reset.js#l188
so need request first. hope helps.
Comments
Post a Comment