相关疑难解决方法(0)

为什么此代码无法在 firebase 中发送密码重置链接?

我是 firebase 新手,我正在尝试在 React.js 中处理 firebase 用户身份验证。我确实设法使用电子邮件和密码创建用户。但是,现在我想向用户发送一个电子邮件链接以重置其密码。

我的代码目前看起来像这样。

// This line of code belongs to the top
import { auth } from '../firebaseConfig'

//This part goes under the React component
    <p onClick={async () => {
      try{
        await sendPasswordResetEmail(auth, // My Email Id)
        alert('Password reset link has been sent to your email')
      }
      catch(err){
        alert(err)
      }
    }}
    >Forgot your Password ?</p>
Run Code Online (Sandbox Code Playgroud)

但是,我没有收到任何错误消息,但收到了一条警告消息:“密码重置链接已发送到您的电子邮件。” 不幸的是,我没有收到任何电子邮件。请注意,出于测试目的,我已经给出了我自己的电子邮件 ID 作为参数。

javascript firebase reactjs firebase-authentication

1
推荐指数
1
解决办法
1434
查看次数