How to use confirmPasswordReset(code, newPassword) in firebase API?

佐手、 提交于 2019-12-13 15:27:16

问题


I am going to use 2 firebase APIs for forgot password function.

1 sendPasswordResetEmail
2 confirmPasswordReset

When I called sendPasswordResetEmail, Firebase Api sent password reset url to my email,but now I have to get verify code to be param of confirmPasswordReset. I want to know where does "code" comes from in confirmPasswordReset function. (I can't see code in my email, Firebase API only sent password reset url)


回答1:


The code is present in the clickable link that's in the email Firebase sends to the user. In your template, you can see it as:

https://yours.firebaseapp.com/__/auth/action?mode=<action>&oobCode=<code>

The code needed is the value of the oobCode parameter.



来源:https://stackoverflow.com/questions/42278014/how-to-use-confirmpasswordresetcode-newpassword-in-firebase-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!