The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/auth > signInAnonymously

signInAnonymously() function

Asynchronously signs in as an anonymous user.

Signature:

export declare function signInAnonymously(auth: Auth): Promise<UserCredential>;

Parameters

Parameter Type Description
auth Auth The Auth instance.

Returns:

Promise<UserCredential>

Description

If there is already an anonymous user signed in, that user will be returned; otherwise, a new anonymous user identity will be created and returned.