View source: R/sign_in_anonymously.R
sign_in_anonymously | R Documentation |
Sign in a user anonymously
sign_in_anonymously()
To use sign in users anonymously, you must first enable the Anonymous sign in method in your firebase project.
Go to Firebase console and check your Sign-in providers under the Sign-in Methods tab in the Authentication service and make sure Anonymous is enabled.
Visit Firebase Auth REST API docs for more details.
A named list with the following items:
idToken
: A Firebase Auth ID token for the newly created user.
email
: Since the user is anonymous, this should be empty.
refreshToken
: A Firebase Auth refresh token for the newly created user.
expiresIn
: The number of seconds in which the ID token expires.
localId
: The uid of the newly created user.
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:
user <- sign_in_anonymously()
user
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.