powered by
Exchanges a custom Auth token for an ID and refresh token
exchange_custom_token(token)
A named list with the following items:
idToken: A Firebase Auth ID token generated from the provided custom token.
idToken
refreshToken: A Firebase Auth refresh token generated from the provided custom token.
refreshToken
expiresIn: The number of seconds in which the ID token expires.
expiresIn
error:
error
NULL if no error code in response
NULL
A list of 2 if response was an error:
code: Error code
code
message: Error message
message
String. A Firebase Auth custom token from which to create an ID and refresh token pair
Visit Firebase Auth REST API docs for more details
if (FALSE) { exchange_custom_token(token = "your-firebase-auth-custom-token") }
Run the code above in your browser using DataLab