Firebase Authentication.

## Functions

| Function | Description |
|---|---|
| [getAuth(app)](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#getauth_8a40afc) | Gets the [Auth](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.auth.md.txt#auth_class) service for the default app or a given app.`getAuth()` can be called with no arguments to access the default app's [Auth](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.auth.md.txt#auth_class) service or as `getAuth(app)` to access the [Auth](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.auth.md.txt#auth_class) service associated with a specific app. |

## Classes

| Class | Description |
|---|---|
| [Auth](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.auth.md.txt#auth_class) | Auth service bound to the provided app. An Auth instance can have multiple tenants. |
| [BaseAuth](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauth_class) | Common parent interface for both `Auth` and `TenantAwareAuth` APIs. |
| [FirebaseAuthError](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.firebaseautherror.md.txt#firebaseautherror_class) | Firebase Auth error code structure. This extends `FirebaseError`. |
| [MultiFactorInfo](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.multifactorinfo.md.txt#multifactorinfo_class) | Interface representing the common properties of a user-enrolled second factor. |
| [MultiFactorSettings](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.multifactorsettings.md.txt#multifactorsettings_class) | The multi-factor related user settings. |
| [PhoneMultiFactorInfo](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.phonemultifactorinfo.md.txt#phonemultifactorinfo_class) | Interface representing a phone specific user-enrolled second factor. |
| [ProjectConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.projectconfig.md.txt#projectconfig_class) | Represents a project configuration. |
| [ProjectConfigManager](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.projectconfigmanager.md.txt#projectconfigmanager_class) | Manages (gets and updates) the current project config. |
| [Tenant](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.tenant.md.txt#tenant_class) | Represents a tenant configuration.Multi-tenancy support requires Google Cloud's Identity Platform (GCIP). To learn more about GCIP, including pricing and features, see the [GCIP documentation](https://cloud.google.com/identity-platform).Before multi-tenancy can be used on a Google Cloud Identity Platform project, tenants must be allowed on that project via the Cloud Console UI.A tenant configuration provides information such as the display name, tenant identifier and email authentication configuration. For OIDC/SAML provider configuration management, `TenantAwareAuth` instances should be used instead of a `Tenant` to retrieve the list of configured IdPs on a tenant. When configuring these providers, note that tenants will inherit whitelisted domains and authenticated redirect URIs of their parent project.All other settings of a tenant will also be inherited. These will need to be managed from the Cloud Console UI. |
| [TenantAwareAuth](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.tenantawareauth.md.txt#tenantawareauth_class) | Tenant-aware `Auth` interface used for managing users, configuring SAML/OIDC providers, generating email links for password reset, email verification, etc for specific tenants.Multi-tenancy support requires Google Cloud's Identity Platform (GCIP). To learn more about GCIP, including pricing and features, see the [GCIP documentation](https://cloud.google.com/identity-platform).Each tenant contains its own identity providers, settings and sets of users. Using `TenantAwareAuth`, users for a specific tenant and corresponding OIDC/SAML configurations can also be managed, ID tokens for users signed in to a specific tenant can be verified, and email action links can also be generated for users belonging to the tenant.`TenantAwareAuth` instances for a specific `tenantId` can be instantiated by calling [TenantManager.authForTenant()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.tenantmanager.md.txt#tenantmanagerauthfortenant). |
| [TenantManager](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.tenantmanager.md.txt#tenantmanager_class) | Defines the tenant manager used to help manage tenant related operations. This includes: - The ability to create, update, list, get and delete tenants for the underlying project. - Getting a `TenantAwareAuth` instance for running Auth related operations (user management, provider configuration management, token verification, email link generation, etc) in the context of a specified tenant. |
| [UserInfo](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.userinfo.md.txt#userinfo_class) | Represents a user's info from a third-party identity provider such as Google or Facebook. |
| [UserMetadata](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.usermetadata.md.txt#usermetadata_class) | Represents a user's metadata. |
| [UserRecord](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.userrecord.md.txt#userrecord_class) | Represents a user. |

## Interfaces

| Interface | Description |
|---|---|
| [ActionCodeSettings](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.actioncodesettings.md.txt#actioncodesettings_interface) | This is the interface that defines the required continue/state URL with optional Android and iOS bundle identifiers. |
| [AllowByDefault](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.allowbydefault.md.txt#allowbydefault_interface) | Defines a policy of allowing every region by default and adding disallowed regions to a disallow list. |
| [AllowByDefaultWrap](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.allowbydefaultwrap.md.txt#allowbydefaultwrap_interface) | Mutual exclusive SMS Region Config of AllowByDefault interface |
| [AllowlistOnly](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.allowlistonly.md.txt#allowlistonly_interface) | Defines a policy of only allowing regions by explicitly adding them to an allowlist. |
| [AllowlistOnlyWrap](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.allowlistonlywrap.md.txt#allowlistonlywrap_interface) | Mutually exclusive SMS Region Config of AllowlistOnly interface |
| [AuthProviderConfigFilter](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.authproviderconfigfilter.md.txt#authproviderconfigfilter_interface) | The filter interface used for listing provider configurations. This is used when specifying how to list configured identity providers via [BaseAuth.listProviderConfigs()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthlistproviderconfigs). |
| [BaseAuthProviderConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauthproviderconfig.md.txt#baseauthproviderconfig_interface) | The base Auth provider configuration interface. |
| [BaseCreateMultiFactorInfoRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.basecreatemultifactorinforequest.md.txt#basecreatemultifactorinforequest_interface) | Interface representing base properties of a user-enrolled second factor for a `CreateRequest`. |
| [BaseUpdateMultiFactorInfoRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseupdatemultifactorinforequest.md.txt#baseupdatemultifactorinforequest_interface) | Interface representing common properties of a user-enrolled second factor for an `UpdateRequest`. |
| [CreatePhoneMultiFactorInfoRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.createphonemultifactorinforequest.md.txt#createphonemultifactorinforequest_interface) | Interface representing a phone specific user-enrolled second factor for a `CreateRequest`. |
| [CreateRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.createrequest.md.txt#createrequest_interface) | Interface representing the properties to set on a new user record to be created. |
| [CustomStrengthOptionsConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.customstrengthoptionsconfig.md.txt#customstrengthoptionsconfig_interface) | Constraints to be enforced on the password policy |
| [DecodedIdToken](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.decodedidtoken.md.txt#decodedidtoken_interface) | Interface representing a decoded Firebase ID token, returned from the [BaseAuth.verifyIdToken()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthverifyidtoken) method.Firebase ID tokens are OpenID Connect spec-compliant JSON Web Tokens (JWTs). See the \[ID Token section of the OpenID Connect spec\](http://openid.net/specs/openid-connect-core-1_0.html#IDToken) for more information about the specific properties below. |
| [DeleteUsersResult](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.deleteusersresult.md.txt#deleteusersresult_interface) | Represents the result of the [BaseAuth.deleteUsers()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthdeleteusers). API. |
| [EmailIdentifier](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.emailidentifier.md.txt#emailidentifier_interface) | Used for looking up an account by email.See [BaseAuth.getUsers()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthgetusers). |
| [EmailPrivacyConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.emailprivacyconfig.md.txt#emailprivacyconfig_interface) | The email privacy configuration of a project or tenant. |
| [EmailSignInProviderConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.emailsigninproviderconfig.md.txt#emailsigninproviderconfig_interface) | The email sign in provider configuration. |
| [GetUsersResult](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.getusersresult.md.txt#getusersresult_interface) | Represents the result of the [BaseAuth.getUsers()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthgetusers) API. |
| [ListProviderConfigResults](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.listproviderconfigresults.md.txt#listproviderconfigresults_interface) | The response interface for listing provider configs. This is only available when listing all identity providers' configurations via [BaseAuth.listProviderConfigs()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthlistproviderconfigs). |
| [ListTenantsResult](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.listtenantsresult.md.txt#listtenantsresult_interface) | Interface representing the object returned from a [TenantManager.listTenants()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.tenantmanager.md.txt#tenantmanagerlisttenants) operation. Contains the list of tenants for the current batch and the next page token if available. |
| [ListUsersResult](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.listusersresult.md.txt#listusersresult_interface) | Interface representing the object returned from a [BaseAuth.listUsers()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthlistusers) operation. Contains the list of users for the current batch and the next page token if available. |
| [MobileLinksConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.mobilelinksconfig.md.txt#mobilelinksconfig_interface) | Configuration for settings related to univeral links (iOS) and app links (Android). |
| [MultiFactorConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.multifactorconfig.md.txt#multifactorconfig_interface) | Interface representing a multi-factor configuration. This can be used to define whether multi-factor authentication is enabled or disabled and the list of second factor challenges that are supported. |
| [MultiFactorCreateSettings](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.multifactorcreatesettings.md.txt#multifactorcreatesettings_interface) | The multi-factor related user settings for create operations. |
| [MultiFactorProviderConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.multifactorproviderconfig.md.txt#multifactorproviderconfig_interface) | Interface representing a multi-factor auth provider configuration. This interface is used for second factor auth providers other than SMS. Currently, only TOTP is supported. |
| [MultiFactorUpdateSettings](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.multifactorupdatesettings.md.txt#multifactorupdatesettings_interface) | The multi-factor related user settings for update operations. |
| [OAuthResponseType](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.oauthresponsetype.md.txt#oauthresponsetype_interface) | The interface representing OIDC provider's response object for OAuth authorization flow. One of the following settings is required: - Set `code` to `true` for the code flow. - Set `idToken` to `true` for the ID token flow. |
| [OIDCAuthProviderConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.oidcauthproviderconfig.md.txt#oidcauthproviderconfig_interface) | The \[OIDC\](https://openid.net/specs/openid-connect-core-1_0-final.html) Auth provider configuration interface. An OIDC provider can be created via [BaseAuth.createProviderConfig()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthcreateproviderconfig). |
| [OIDCUpdateAuthProviderRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.oidcupdateauthproviderrequest.md.txt#oidcupdateauthproviderrequest_interface) | The request interface for updating an OIDC Auth provider. This is used when updating an OIDC provider's configuration via [BaseAuth.updateProviderConfig()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthupdateproviderconfig). |
| [PasswordPolicyConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.passwordpolicyconfig.md.txt#passwordpolicyconfig_interface) | A password policy configuration for a project or tenant |
| [PhoneIdentifier](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.phoneidentifier.md.txt#phoneidentifier_interface) | Used for looking up an account by phone number.See [BaseAuth.getUsers()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthgetusers). |
| [ProviderIdentifier](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.provideridentifier.md.txt#provideridentifier_interface) | Used for looking up an account by federated provider.See [BaseAuth.getUsers()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthgetusers). |
| [RecaptchaConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.recaptchaconfig.md.txt#recaptchaconfig_interface) | The request interface for updating a reCAPTCHA Config. By enabling reCAPTCHA Enterprise Integration you are agreeing to reCAPTCHA Enterprise [Term of Service](https://cloud.google.com/terms/service-terms). |
| [RecaptchaKey](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.recaptchakey.md.txt#recaptchakey_interface) | The reCAPTCHA key config. |
| [RecaptchaManagedRule](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.recaptchamanagedrule.md.txt#recaptchamanagedrule_interface) | The config for a reCAPTCHA action rule. |
| [RecaptchaTollFraudManagedRule](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.recaptchatollfraudmanagedrule.md.txt#recaptchatollfraudmanagedrule_interface) | The managed rules for toll fraud provider, containing the enforcement status. The toll fraud provider contains all SMS related user flows. |
| [SAMLAuthProviderConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.samlauthproviderconfig.md.txt#samlauthproviderconfig_interface) | The \[SAML\](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html) Auth provider configuration interface. A SAML provider can be created via [BaseAuth.createProviderConfig()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthcreateproviderconfig). |
| [SAMLUpdateAuthProviderRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.samlupdateauthproviderrequest.md.txt#samlupdateauthproviderrequest_interface) | The request interface for updating a SAML Auth provider. This is used when updating a SAML provider's configuration via [BaseAuth.updateProviderConfig()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthupdateproviderconfig). |
| [SessionCookieOptions](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.sessioncookieoptions.md.txt#sessioncookieoptions_interface) | Interface representing the session cookie options needed for the [BaseAuth.createSessionCookie()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthcreatesessioncookie) method. |
| [TotpMultiFactorProviderConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.totpmultifactorproviderconfig.md.txt#totpmultifactorproviderconfig_interface) | Interface representing configuration settings for TOTP second factor auth. |
| [UidIdentifier](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.uididentifier.md.txt#uididentifier_interface) | Used for looking up an account by uid.See [BaseAuth.getUsers()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthgetusers). |
| [UpdatePhoneMultiFactorInfoRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.updatephonemultifactorinforequest.md.txt#updatephonemultifactorinforequest_interface) | Interface representing a phone specific user-enrolled second factor for an `UpdateRequest`. |
| [UpdateProjectConfigRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.updateprojectconfigrequest.md.txt#updateprojectconfigrequest_interface) | Interface representing the properties to update on the provided project config. |
| [UpdateRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.updaterequest.md.txt#updaterequest_interface) | Interface representing the properties to update on the provided user. |
| [UpdateTenantRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.updatetenantrequest.md.txt#updatetenantrequest_interface) | Interface representing the properties to update on the provided tenant. |
| [UserImportOptions](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.userimportoptions.md.txt#userimportoptions_interface) | Interface representing the user import options needed for [BaseAuth.importUsers()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthimportusers) method. This is used to provide the password hashing algorithm information. |
| [UserImportRecord](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.userimportrecord.md.txt#userimportrecord_interface) | Interface representing a user to import to Firebase Auth via the [BaseAuth.importUsers()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthimportusers) method. |
| [UserImportResult](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.userimportresult.md.txt#userimportresult_interface) | Interface representing the response from the [BaseAuth.importUsers()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthimportusers) method for batch importing users to Firebase Auth. |
| [UserMetadataRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.usermetadatarequest.md.txt#usermetadatarequest_interface) | User metadata to include when importing a user. |
| [UserProvider](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.userprovider.md.txt#userprovider_interface) | Represents a user identity provider that can be associated with a Firebase user. |
| [UserProviderRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.userproviderrequest.md.txt#userproviderrequest_interface) | User provider data to include when importing a user. |

## Variables

| Variable | Description |
|---|---|
| [AuthErrorCode](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#autherrorcode) | The constant mapping for valid Auth client error codes. |

## Type Aliases

| Type Alias | Description |
|---|---|
| [AuthErrorCode](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#autherrorcode) | The type definition for valid Auth client error codes. |
| [AuthFactorType](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#authfactortype) | Identifies a second factor type. |
| [AuthProviderConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#authproviderconfig) | The Auth provider configuration type. [BaseAuth.createProviderConfig()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthcreateproviderconfig). |
| [CreateMultiFactorInfoRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#createmultifactorinforequest) | Type representing the properties of a user-enrolled second factor for a `CreateRequest`. |
| [CreateTenantRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#createtenantrequest) | Interface representing the properties to set on a new tenant. |
| [HashAlgorithmType](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#hashalgorithmtype) |   |
| [MobileLinksDomain](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#mobilelinksdomain) | Open code in app domain to use for app links and universal links. |
| [MultiFactorConfigState](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#multifactorconfigstate) | Identifies a multi-factor configuration state. |
| [PasswordPolicyEnforcementState](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#passwordpolicyenforcementstate) | A password policy's enforcement state. |
| [RecaptchaAction](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#recaptchaaction) | The actions to take for reCAPTCHA-protected requests. - 'BLOCK': The reCAPTCHA-protected request will be blocked. |
| [RecaptchaKeyClientType](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#recaptchakeyclienttype) | The key's platform type. |
| [RecaptchaProviderEnforcementState](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#recaptchaproviderenforcementstate) | Enforcement state of reCAPTCHA protection. - 'OFF': Unenforced. - 'AUDIT': Create assessment but don't enforce the result. - 'ENFORCE': Create assessment and enforce the result. |
| [SmsRegionConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#smsregionconfig) | The request interface for updating a SMS Region Config. Configures the regions where users are allowed to send verification SMS. This is based on the calling code of the destination phone number. |
| [UpdateAuthProviderRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#updateauthproviderrequest) |   |
| [UpdateMultiFactorInfoRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#updatemultifactorinforequest) | Type representing the properties of a user-enrolled second factor for an `UpdateRequest`. |
| [UserIdentifier](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.md.txt#useridentifier) | Identifies a user to be looked up. |

## getAuth(app)

Gets the [Auth](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.auth.md.txt#auth_class) service for the default app or a given app.

`getAuth()` can be called with no arguments to access the default app's [Auth](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.auth.md.txt#auth_class) service or as `getAuth(app)` to access the [Auth](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.auth.md.txt#auth_class) service associated with a specific app.

**Signature:**

```typescript
export declare function getAuth(app?: App): Auth;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| app | App |   |

**Returns:**

[Auth](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.auth.md.txt#auth_class)

### Example 1

```javascript
// Get the Auth service for the default app
const defaultAuth = getAuth();

```

### Example 2

```javascript
// Get the Auth service for a given app
const otherAuth = getAuth(otherApp);

```

## AuthErrorCode

The constant mapping for valid Auth client error codes.

**Signature:**

```typescript
AuthErrorCode: {
    readonly AUTH_BLOCKING_TOKEN_EXPIRED: "auth-blocking-token-expired";
    readonly BILLING_NOT_ENABLED: "billing-not-enabled";
    readonly CLAIMS_TOO_LARGE: "claims-too-large";
    readonly CONFIGURATION_EXISTS: "configuration-exists";
    readonly CONFIGURATION_NOT_FOUND: "configuration-not-found";
    readonly ID_TOKEN_EXPIRED: "id-token-expired";
    readonly INVALID_ARGUMENT: "argument-error";
    readonly INVALID_CONFIG: "invalid-config";
    readonly EMAIL_ALREADY_EXISTS: "email-already-exists";
    readonly EMAIL_NOT_FOUND: "email-not-found";
    readonly FORBIDDEN_CLAIM: "reserved-claim";
    readonly INVALID_ID_TOKEN: "invalid-id-token";
    readonly ID_TOKEN_REVOKED: "id-token-revoked";
    readonly INTERNAL_ERROR: "internal-error";
    readonly INVALID_CLAIMS: "invalid-claims";
    readonly INVALID_CONTINUE_URI: "invalid-continue-uri";
    readonly INVALID_CREATION_TIME: "invalid-creation-time";
    readonly INVALID_CREDENTIAL: "invalid-credential";
    readonly INVALID_DISABLED_FIELD: "invalid-disabled-field";
    readonly INVALID_DISPLAY_NAME: "invalid-display-name";
    readonly INVALID_DYNAMIC_LINK_DOMAIN: "invalid-dynamic-link-domain";
    readonly INVALID_HOSTING_LINK_DOMAIN: "invalid-hosting-link-domain";
    readonly INVALID_EMAIL_VERIFIED: "invalid-email-verified";
    readonly INVALID_EMAIL: "invalid-email";
    readonly INVALID_NEW_EMAIL: "invalid-new-email";
    readonly INVALID_ENROLLED_FACTORS: "invalid-enrolled-factors";
    readonly INVALID_ENROLLMENT_TIME: "invalid-enrollment-time";
    readonly INVALID_HASH_ALGORITHM: "invalid-hash-algorithm";
    readonly INVALID_HASH_BLOCK_SIZE: "invalid-hash-block-size";
    readonly INVALID_HASH_DERIVED_KEY_LENGTH: "invalid-hash-derived-key-length";
    readonly INVALID_HASH_KEY: "invalid-hash-key";
    readonly INVALID_HASH_MEMORY_COST: "invalid-hash-memory-cost";
    readonly INVALID_HASH_PARALLELIZATION: "invalid-hash-parallelization";
    readonly INVALID_HASH_ROUNDS: "invalid-hash-rounds";
    readonly INVALID_HASH_SALT_SEPARATOR: "invalid-hash-salt-separator";
    readonly INVALID_LAST_SIGN_IN_TIME: "invalid-last-sign-in-time";
    readonly INVALID_NAME: "invalid-name";
    readonly INVALID_OAUTH_CLIENT_ID: "invalid-oauth-client-id";
    readonly INVALID_PAGE_TOKEN: "invalid-page-token";
    readonly INVALID_PASSWORD: "invalid-password";
    readonly INVALID_PASSWORD_HASH: "invalid-password-hash";
    readonly INVALID_PASSWORD_SALT: "invalid-password-salt";
    readonly INVALID_PHONE_NUMBER: "invalid-phone-number";
    readonly INVALID_PHOTO_URL: "invalid-photo-url";
    readonly INVALID_PROJECT_ID: "invalid-project-id";
    readonly INVALID_PROVIDER_DATA: "invalid-provider-data";
    readonly INVALID_PROVIDER_ID: "invalid-provider-id";
    readonly INVALID_PROVIDER_UID: "invalid-provider-uid";
    readonly INVALID_OAUTH_RESPONSETYPE: "invalid-oauth-responsetype";
    readonly INVALID_SESSION_COOKIE_DURATION: "invalid-session-cookie-duration";
    readonly INVALID_TENANT_ID: "invalid-tenant-id";
    readonly INVALID_TENANT_TYPE: "invalid-tenant-type";
    readonly INVALID_TESTING_PHONE_NUMBER: "invalid-testing-phone-number";
    readonly INVALID_UID: "invalid-uid";
    readonly INVALID_USER_IMPORT: "invalid-user-import";
    readonly INVALID_TOKENS_VALID_AFTER_TIME: "invalid-tokens-valid-after-time";
    readonly MISMATCHING_TENANT_ID: "mismatching-tenant-id";
    readonly MISSING_ANDROID_PACKAGE_NAME: "missing-android-package-name";
    readonly MISSING_CONFIG: "missing-config";
    readonly MISSING_CONTINUE_URI: "missing-continue-uri";
    readonly MISSING_DISPLAY_NAME: "missing-display-name";
    readonly MISSING_EMAIL: "missing-email";
    readonly MISSING_IOS_BUNDLE_ID: "missing-ios-bundle-id";
    readonly MISSING_ISSUER: "missing-issuer";
    readonly MISSING_HASH_ALGORITHM: "missing-hash-algorithm";
    readonly MISSING_OAUTH_CLIENT_ID: "missing-oauth-client-id";
    readonly MISSING_OAUTH_CLIENT_SECRET: "missing-oauth-client-secret";
    readonly MISSING_PROVIDER_ID: "missing-provider-id";
    readonly MISSING_SAML_RELYING_PARTY_CONFIG: "missing-saml-relying-party-config";
    readonly MAXIMUM_TEST_PHONE_NUMBER_EXCEEDED: "test-phone-number-limit-exceeded";
    readonly MAXIMUM_USER_COUNT_EXCEEDED: "maximum-user-count-exceeded";
    readonly MISSING_UID: "missing-uid";
    readonly OPERATION_NOT_ALLOWED: "operation-not-allowed";
    readonly PASSWORD_DOES_NOT_MEET_REQUIREMENTS: "password-does-not-meet-requirements";
    readonly PHONE_NUMBER_ALREADY_EXISTS: "phone-number-already-exists";
    readonly PROJECT_NOT_FOUND: "project-not-found";
    readonly INSUFFICIENT_PERMISSION: "insufficient-permission";
    readonly QUOTA_EXCEEDED: "quota-exceeded";
    readonly SECOND_FACTOR_LIMIT_EXCEEDED: "second-factor-limit-exceeded";
    readonly SECOND_FACTOR_UID_ALREADY_EXISTS: "second-factor-uid-already-exists";
    readonly SESSION_COOKIE_EXPIRED: "session-cookie-expired";
    readonly SESSION_COOKIE_REVOKED: "session-cookie-revoked";
    readonly TENANT_NOT_FOUND: "tenant-not-found";
    readonly UID_ALREADY_EXISTS: "uid-already-exists";
    readonly UNAUTHORIZED_DOMAIN: "unauthorized-continue-uri";
    readonly UNSUPPORTED_FIRST_FACTOR: "unsupported-first-factor";
    readonly UNSUPPORTED_SECOND_FACTOR: "unsupported-second-factor";
    readonly UNSUPPORTED_TENANT_OPERATION: "unsupported-tenant-operation";
    readonly UNVERIFIED_EMAIL: "unverified-email";
    readonly USER_NOT_FOUND: "user-not-found";
    readonly NOT_FOUND: "not-found";
    readonly USER_DISABLED: "user-disabled";
    readonly USER_NOT_DISABLED: "user-not-disabled";
    readonly INVALID_RECAPTCHA_ACTION: "invalid-recaptcha-action";
    readonly INVALID_RECAPTCHA_ENFORCEMENT_STATE: "invalid-recaptcha-enforcement-state";
    readonly RECAPTCHA_NOT_ENABLED: "recaptcha-not-enabled";
}
```

## AuthErrorCode

The type definition for valid Auth client error codes.

**Signature:**

```typescript
export type AuthErrorCode = typeof AuthErrorCode[keyof typeof AuthErrorCode];
```

## AuthFactorType

Identifies a second factor type.

**Signature:**

```typescript
export type AuthFactorType = 'phone';
```

## AuthProviderConfig

The Auth provider configuration type. [BaseAuth.createProviderConfig()](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.baseauth.md.txt#baseauthcreateproviderconfig).

**Signature:**

```typescript
export type AuthProviderConfig = SAMLAuthProviderConfig | OIDCAuthProviderConfig;
```

## CreateMultiFactorInfoRequest

Type representing the properties of a user-enrolled second factor for a `CreateRequest`.

**Signature:**

```typescript
export type CreateMultiFactorInfoRequest = CreatePhoneMultiFactorInfoRequest;
```

## CreateTenantRequest

Interface representing the properties to set on a new tenant.

**Signature:**

```typescript
export type CreateTenantRequest = UpdateTenantRequest;
```

## HashAlgorithmType

**Signature:**

```typescript
export type HashAlgorithmType = 'SCRYPT' | 'STANDARD_SCRYPT' | 'HMAC_SHA512' | 'HMAC_SHA256' | 'HMAC_SHA1' | 'HMAC_MD5' | 'MD5' | 'PBKDF_SHA1' | 'BCRYPT' | 'PBKDF2_SHA256' | 'SHA512' | 'SHA256' | 'SHA1';
```

## MobileLinksDomain

Open code in app domain to use for app links and universal links.

**Signature:**

```typescript
export type MobileLinksDomain = 'HOSTING_DOMAIN' | 'FIREBASE_DYNAMIC_LINK_DOMAIN';
```

## MultiFactorConfigState

Identifies a multi-factor configuration state.

**Signature:**

```typescript
export type MultiFactorConfigState = 'ENABLED' | 'DISABLED';
```

## PasswordPolicyEnforcementState

A password policy's enforcement state.

**Signature:**

```typescript
export type PasswordPolicyEnforcementState = 'ENFORCE' | 'OFF';
```

## RecaptchaAction

The actions to take for reCAPTCHA-protected requests. - 'BLOCK': The reCAPTCHA-protected request will be blocked.

**Signature:**

```typescript
export type RecaptchaAction = 'BLOCK';
```

## RecaptchaKeyClientType

The key's platform type.

**Signature:**

```typescript
export type RecaptchaKeyClientType = 'WEB' | 'IOS' | 'ANDROID';
```

## RecaptchaProviderEnforcementState

Enforcement state of reCAPTCHA protection. - 'OFF': Unenforced. - 'AUDIT': Create assessment but don't enforce the result. - 'ENFORCE': Create assessment and enforce the result.

**Signature:**

```typescript
export type RecaptchaProviderEnforcementState = 'OFF' | 'AUDIT' | 'ENFORCE';
```

## SmsRegionConfig

The request interface for updating a SMS Region Config. Configures the regions where users are allowed to send verification SMS. This is based on the calling code of the destination phone number.

**Signature:**

```typescript
export type SmsRegionConfig = AllowByDefaultWrap | AllowlistOnlyWrap;
```

## UpdateAuthProviderRequest

**Signature:**

```typescript
export type UpdateAuthProviderRequest = SAMLUpdateAuthProviderRequest | OIDCUpdateAuthProviderRequest;
```

## UpdateMultiFactorInfoRequest

Type representing the properties of a user-enrolled second factor for an `UpdateRequest`.

**Signature:**

```typescript
export type UpdateMultiFactorInfoRequest = UpdatePhoneMultiFactorInfoRequest;
```

## UserIdentifier

Identifies a user to be looked up.

**Signature:**

```typescript
export type UserIdentifier = UidIdentifier | EmailIdentifier | PhoneIdentifier | ProviderIdentifier;
```