exchange_custom_token: Exchange custom token for an ID and refresh token

View source: R/exchange_custom_token.R

exchange_custom_tokenR Documentation

Exchange custom token for an ID and refresh token

Description

Exchanges a custom Auth token for an ID and refresh token

Usage

exchange_custom_token(token)

Arguments

token

String. A Firebase Auth custom token from which to create an ID and refresh token pair

Details

Visit Firebase Auth REST API docs for more details

Value

A named list with the following items:

  • idToken: A Firebase Auth ID token generated from the provided custom token.

  • refreshToken: A Firebase Auth refresh token generated from the provided custom token.

  • expiresIn: 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

Examples

## Not run: 
  exchange_custom_token(token = "your-firebase-auth-custom-token")

## End(Not run)

firebase.auth.rest documentation built on April 3, 2025, 6:19 p.m.