本文介绍了如何在Firebase API中使用ConfirmPasswordReset(code,newPassword)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将使用2个Firebase API来实现忘记密码的功能.

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

1 sendPasswordResetEmail
2 confirmPasswordReset

当我打电话给sendPasswordResetEmail时,Firebase Api将密码重置网址发送到了我的电子邮件中,但是现在我必须获取验证码作为ConfirmPasswordReset的参数.我想知道confirmPasswordReset函数中代码"的来源.(我在电子邮件中看不到代码,Firebase API仅发送了密码重置网址)

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)

推荐答案

该代码显示在Firebase发送给用户的电子邮件中的可单击链接中.在您的模板中,您可以将其显示为:

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>

所需的代码是oobCode参数的值.

The code needed is the value of the oobCode parameter.

这篇关于如何在Firebase API中使用ConfirmPasswordReset(code,newPassword)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 02:50