Skip to content

Commit

Permalink
update verifyPasswordResetCode doc
Browse files Browse the repository at this point in the history
That function does return the email address string if valid, therefore, update the TypeScript definition to match.
  • Loading branch information
Shane committed Sep 15, 2022
1 parent 630142f commit 4ba9b59
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

0 comments on commit 4ba9b59

Please sign in to comment.