Learn R Programming

firebase.auth.rest (version 1.0.0)

change_password: Change password

Description

Change password

Usage

change_password(id_token, password)

Value

A named list with the following items:

  • localId: The uid of the current user.

  • email: User's email address.

  • passwordHash: Hash version of password.

  • providerUserInfo: A named list of of all linked provider objects which contain "providerId" and "federatedId".

  • idToken: New Firebase Auth ID token for user.

  • refreshToken: A Firebase Auth refresh token.

  • expiresIn: string The number of seconds in which the ID token expires.

  • error:

    • NULL if no error code in response

    • A list of 2 if response was an error:

      • code: Error code

      • message: Error message

Arguments

id_token

A Firebase Auth ID token for the user.

password

User's new password.

Details

Visit Firebase Auth REST API docs for more details

Examples

Run this code
if (FALSE) {
  # first sign in user and get the 'id_token':
  user <- sign_in(email = "user@gmail.com", password = "password")
  id_token <- user$idToken

  # change password:
  response <- change_password(
    id_token = id_token,
    password = "new-user-password"
  )
  response
}

Run the code above in your browser using DataLab