voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
32 lines (18 loc) • 932 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/auth](./auth.md) > [Auth](./auth.auth.md) > [tenantId](./auth.auth.tenantid.md)
## Auth.tenantId property
The Auth instance's tenant ID.
<b>Signature:</b>
```typescript
tenantId: string | null;
```
## Remarks
This is a readable/writable property. When you set the tenant ID of an Auth instance, all future sign-in/sign-up operations will pass this tenant ID and sign in or sign up users to the specified tenant project. When set to null, users are signed in to the parent project.
## Example
```javascript
// Set the tenant ID on Auth instance.
auth.tenantId = 'TENANT_PROJECT_ID';
// All future sign-in request now include tenant ID.
const result = await signInWithEmailAndPassword(auth, email, password);
// result.user.tenantId should be 'TENANT_PROJECT_ID'.
```