voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
29 lines (16 loc) • 789 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/auth](./auth.md) > [signInAnonymously](./auth.signinanonymously.md)
## signInAnonymously() function
Asynchronously signs in as an anonymous user.
<b>Signature:</b>
```typescript
export declare function signInAnonymously(auth: Auth): Promise<UserCredential>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| auth | [Auth](./auth.auth.md) | The Auth instance. |
<b>Returns:</b>
Promise<[UserCredential](./auth.usercredential.md)<!-- -->>
## Remarks
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.