Hi team, Im working on forgot password flow. I've customized the url to my UI and i receive a token ...
m
Hi team, Im working on forgot password flow. I've customized the url to my UI and i receive a token in the url. The method in angular takes in the new password as parameter. How do I send the token with the same method? Ive gone through the docs and couldnt find any fix. Could someone help here?
n
Hi @mukulg22 What frontend SDK are you using?
m
@nkshah2 0.3.0
n
No I meant which frontend sdk? (supertokens-web-js for example)
m
yes, supertokens-web-js
n
Right so you would use
submitNewPassword
to submit the new password. By default this function reads the token from the current URL of the page so if yo uare calling this on the route that you recieve the token you should not need to do anything additional to get it to work
m
the landing page for reset password is different and im consuming this method from the component. In this approach should i do anything?
n
Right so Im guessing you somehow store the token form the landing and then pass it on to your component?
m
it worked without any manual intervention. Thanks @nkshah2
n
Happy to help!