Skip to content

Commit

Permalink
fix(auth, types): verifyPasswordResetCode returns Promise<string> wit…
Browse files Browse the repository at this point in the history
…h email address (#6537)

That function does return the email address string if valid, therefore, update the TypeScript definition to match.
  • Loading branch information
Shane Zheng authored Sep 17, 2022
1 parent 1fe3570 commit 6f67c2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/auth/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1645,16 +1645,17 @@ export namespace FirebaseAuthTypes {
* #### Example
*
* ```js
* await firebase.auth().verifyPasswordResetCode('ABCD');
* const verifiedEmail = await firebase.auth().verifyPasswordResetCode('ABCD');
* ```
*
* @error auth/expired-action-code Thrown if the password reset code has expired.
* @error auth/invalid-action-code Thrown if the password reset code is invalid. This can happen if the code is malformed or has already been used.
* @error auth/user-disabled Thrown if the user corresponding to the given password reset code has been disabled.
* @error auth/user-not-found Thrown if there is no user corresponding to the password reset code. This may have happened if the user was deleted between when the code was issued and when this method was called.
* @param code A password reset code.
* @returns {string} The user's email address if valid
*/
verifyPasswordResetCode(code: string): Promise<void>;
verifyPasswordResetCode(code: string): Promise<string>;
/**
* Switch userAccessGroup and current user to the given accessGroup and the user stored in it.
* Sign in a user with any sign in method, and the same current user is available in all
Expand Down

1 comment on commit 6f67c2c

@vercel
Copy link

@vercel vercel bot commented on 6f67c2c Sep 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.