From 4a7270576166be70b91afe6646388aed5074b2cf Mon Sep 17 00:00:00 2001 From: Michael Parsakia <28745698+mparsakia@users.noreply.github.com> Date: Wed, 2 Mar 2022 03:30:54 -0800 Subject: [PATCH] pr request setup for useSendPasswordResetEmail hook. --- auth/README.md | 10 +++++++--- auth/useSendPasswordResetEmail.ts | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/auth/README.md b/auth/README.md index d44b318..b150a3c 100644 --- a/auth/README.md +++ b/auth/README.md @@ -646,7 +646,7 @@ The `useSendPasswordResetEmail` hook takes the following parameters: Returns: -- `sendPasswordResetEmail(email: string)`: a function you can call to send a password reset emaail +- `sendPasswordResetEmail(email: string, actionCodeSettings?:ActionCodeSettings)`: a function you can call to send a password reset email. Optionally accepts an [actionCodeSettings](https://firebase.google.com/docs/reference/js/auth.actioncodesettings.md#actioncodesettings_interface) object as well. - `sending`: A `boolean` to indicate whether the email is being sent - `error`: Any `Error` returned by Firebase when trying to send the email, or `undefined` if there is no error @@ -660,6 +660,10 @@ const SendPasswordReset = () => { const [sendPasswordResetEmail, sending, error] = useSendPasswordResetEmail( auth ); + + const actionCodeSettings = { + url: 'https://www.example.com/login' +} if (error) { return ( @@ -680,7 +684,7 @@ const SendPasswordReset = () => { />