View source: R/exchange_refresh_token.R
exchange_refresh_token | R Documentation |
Refreshes a Firebase ID token
exchange_refresh_token(refresh_token)
refresh_token |
String. A Firebase Auth refresh token. |
Visit Firebase Auth REST API docs for more details
A named list with the following items:
expires_in
: The number of seconds in which the ID token expires.
token_type
: The type of the refresh token, always "Bearer".
refresh_token
: The Firebase Auth refresh token provided, or a new
refresh token.
id_token
: A Firebase Auth ID token.
user_id
: The uid corresponding to the provided ID token.
project_id
: Your Firebase project ID.
error
:
NULL
if no error code in response
A list of 2 if response was an error:
code
: Error code
message
: Error message
## Not run:
# first sign in user and get the 'refresh_token':
user <- sign_in(email = "user@gmail.com", password = "password")
refresh_token <- user$refreshToken
# exchange the refresh token:
response <- exchange_refresh_token(refresh_token = refresh_token)
response
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.