| java.lang.Object | |
| ↳ | com.google.firebase.auth.AbstractFirebaseAuth |
Known Direct Subclasses
|
This is the abstract class for server-side Firebase Authentication actions.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| class | AbstractFirebaseAuth.Builder<T extends Builder<T>> | ||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| AbstractFirebaseAuth(Builder<?> builder) | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String |
createCustomToken(String uid)
Creates a Firebase custom token for the given UID.
| ||||||||||
| String |
createCustomToken(String uid, Map<String, Object> developerClaims)
Creates a Firebase custom token for the given UID, containing the specified additional claims.
| ||||||||||
| ApiFuture<String> |
createCustomTokenAsync(String uid, Map<String, Object> developerClaims)
Similar to
createCustomToken(String, Map) but performs the operation asynchronously. | ||||||||||
| ApiFuture<String> |
createCustomTokenAsync(String uid)
Similar to
createCustomToken(String) but performs the operation asynchronously. | ||||||||||
| OidcProviderConfig |
createOidcProviderConfig(OidcProviderConfig.CreateRequest request)
Creates a new OpenID Connect auth provider config with the attributes contained in the
specified
OidcProviderConfig.CreateRequest. | ||||||||||
| ApiFuture<OidcProviderConfig> |
createOidcProviderConfigAsync(OidcProviderConfig.CreateRequest request)
Similar to
createOidcProviderConfig(OidcProviderConfig.CreateRequest) but performs the operation asynchronously. | ||||||||||
| SamlProviderConfig |
createSamlProviderConfig(SamlProviderConfig.CreateRequest request)
Creates a new SAML Auth provider config with the attributes contained in the specified
SamlProviderConfig.CreateRequest. | ||||||||||
| ApiFuture<SamlProviderConfig> |
createSamlProviderConfigAsync(SamlProviderConfig.CreateRequest request)
Similar to
createSamlProviderConfig(SamlProviderConfig.CreateRequest) but performs the operation asynchronously. | ||||||||||
| String |
createSessionCookie(String idToken, SessionCookieOptions options)
Creates a new Firebase session cookie from the given ID token and options.
| ||||||||||
| ApiFuture<String> |
createSessionCookieAsync(String idToken, SessionCookieOptions options)
Similar to
createSessionCookie(String, SessionCookieOptions) but performs the
operation asynchronously. | ||||||||||
| UserRecord |
createUser(UserRecord.CreateRequest request)
Creates a new user account with the attributes contained in the specified
UserRecord.CreateRequest. | ||||||||||
| ApiFuture<UserRecord> |
createUserAsync(UserRecord.CreateRequest request)
Similar to
createUser(UserRecord.CreateRequest) but performs the operation asynchronously. | ||||||||||
| void |
deleteOidcProviderConfig(String providerId)
Deletes the OpenID Connect auth provider config identified by the specified provider ID.
| ||||||||||
| ApiFuture<Void> |
deleteOidcProviderConfigAsync(String providerId)
Similar to
deleteOidcProviderConfig(String) but performs the operation asynchronously. | ||||||||||
| void |
deleteSamlProviderConfig(String providerId)
Deletes the SAML Auth provider config identified by the specified provider ID.
| ||||||||||
| ApiFuture<Void> |
deleteSamlProviderConfigAsync(String providerId)
Similar to
deleteSamlProviderConfig(String) but performs the operation asynchronously. | ||||||||||
| void |
deleteUser(String uid)
Deletes the user identified by the specified user ID.
| ||||||||||
| ApiFuture<Void> |
deleteUserAsync(String uid)
Similar to
deleteUser(String) but performs the operation asynchronously. | ||||||||||
| DeleteUsersResult |
deleteUsers(List<String> uids)
Deletes the users specified by the given identifiers.
| ||||||||||
| ApiFuture<DeleteUsersResult> |
deleteUsersAsync(List<String> uids)
Similar to
deleteUsers(List) but performs the operation asynchronously. | ||||||||||
| String |
generateEmailVerificationLink(String email, ActionCodeSettings settings)
Generates the out-of-band email action link for email verification flows for the specified
email address, using the action code settings provided.
| ||||||||||
| String |
generateEmailVerificationLink(String email)
Generates the out-of-band email action link for email verification flows for the specified
email address.
| ||||||||||
| ApiFuture<String> |
generateEmailVerificationLinkAsync(String email, ActionCodeSettings settings)
Similar to
generateEmailVerificationLink(String, ActionCodeSettings) but performs the
operation asynchronously. | ||||||||||
| ApiFuture<String> |
generateEmailVerificationLinkAsync(String email)
Similar to
generateEmailVerificationLink(String) but performs the operation
asynchronously. | ||||||||||
| String |
generatePasswordResetLink(String email, ActionCodeSettings settings)
Generates the out-of-band email action link for password reset flows for the specified email
address.
| ||||||||||
| String |
generatePasswordResetLink(String email)
Generates the out-of-band email action link for password reset flows for the specified email
address.
| ||||||||||
| ApiFuture<String> |
generatePasswordResetLinkAsync(String email, ActionCodeSettings settings)
Similar to
generatePasswordResetLink(String, ActionCodeSettings) but performs the
operation asynchronously. | ||||||||||
| ApiFuture<String> |
generatePasswordResetLinkAsync(String email)
Similar to
generatePasswordResetLink(String) but performs the operation
asynchronously. | ||||||||||
| String |
generateSignInWithEmailLink(String email, ActionCodeSettings settings)
Generates the out-of-band email action link for email link sign-in flows, using the action code
settings provided.
| ||||||||||
| ApiFuture<String> |
generateSignInWithEmailLinkAsync(String email, ActionCodeSettings settings)
Similar to
generateSignInWithEmailLink(String, ActionCodeSettings) but performs the
operation asynchronously. | ||||||||||
| OidcProviderConfig |
getOidcProviderConfig(String providerId)
Gets the OpenID Connect auth provider corresponding to the specified provider ID.
| ||||||||||
| ApiFuture<OidcProviderConfig> |
getOidcProviderConfigAsync(String providerId)
Similar to
getOidcProviderConfig(String) but performs the operation asynchronously. | ||||||||||
| SamlProviderConfig |
getSamlProviderConfig(String providerId)
Gets the SAML Auth provider config corresponding to the specified provider ID.
| ||||||||||
| ApiFuture<SamlProviderConfig> |
getSamlProviderConfigAsync(String providerId)
Similar to
getSamlProviderConfig(String) but performs the operation asynchronously. | ||||||||||
| UserRecord |
getUser(String uid)
Gets the user data corresponding to the specified user ID.
| ||||||||||
| ApiFuture<UserRecord> |
getUserAsync(String uid)
Similar to
getUser(String) but performs the operation asynchronously. | ||||||||||
| UserRecord |
getUserByEmail(String email)
Gets the user data corresponding to the specified user email.
| ||||||||||
| ApiFuture<UserRecord> |
getUserByEmailAsync(String email)
Similar to
getUserByEmail(String) but performs the operation asynchronously. | ||||||||||
| UserRecord |
getUserByPhoneNumber(String phoneNumber)
Gets the user data corresponding to the specified user phone number.
| ||||||||||
| ApiFuture<UserRecord> |
getUserByPhoneNumberAsync(String phoneNumber)
Gets the user data corresponding to the specified user phone number.
| ||||||||||
| UserRecord |
getUserByProviderUid(String providerId, String uid)
Gets the user data for the user corresponding to a given provider ID.
| ||||||||||
| ApiFuture<UserRecord> |
getUserByProviderUidAsync(String providerId, String uid)
Gets the user data for the user corresponding to a given provider ID.
| ||||||||||
| GetUsersResult |
getUsers(Collection<UserIdentifier> identifiers)
Gets the user data corresponding to the specified identifiers.
| ||||||||||
| ApiFuture<GetUsersResult> |
getUsersAsync(Collection<UserIdentifier> identifiers)
Gets the user data corresponding to the specified identifiers.
| ||||||||||
| UserImportResult |
importUsers(List<ImportUserRecord> users)
Imports the provided list of users into Firebase Auth.
| ||||||||||
| UserImportResult |
importUsers(List<ImportUserRecord> users, UserImportOptions options)
Imports the provided list of users into Firebase Auth.
| ||||||||||
| ApiFuture<UserImportResult> |
importUsersAsync(List<ImportUserRecord> users)
Similar to
importUsers(List) but performs the operation asynchronously. | ||||||||||
| ApiFuture<UserImportResult> |
importUsersAsync(List<ImportUserRecord> users, UserImportOptions options)
Similar to
importUsers(List, UserImportOptions) but performs the operation
asynchronously. | ||||||||||
| ListProviderConfigsPage<OidcProviderConfig> |
listOidcProviderConfigs(String pageToken)
Gets a page of OpenID Connect auth provider configs starting from the specified
pageToken. | ||||||||||
| ListProviderConfigsPage<OidcProviderConfig> |
listOidcProviderConfigs(String pageToken, int maxResults)
Gets a page of OpenID Connect auth provider configs starting from the specified
pageToken. | ||||||||||
| ApiFuture<ListProviderConfigsPage<OidcProviderConfig>> |
listOidcProviderConfigsAsync(String pageToken)
Similar to
listOidcProviderConfigs(String) but performs the operation asynchronously. | ||||||||||
| ApiFuture<ListProviderConfigsPage<OidcProviderConfig>> |
listOidcProviderConfigsAsync(String pageToken, int maxResults)
Similar to
listOidcProviderConfigs(String, int) but performs the operation
asynchronously. | ||||||||||
| ListProviderConfigsPage<SamlProviderConfig> |
listSamlProviderConfigs(String pageToken)
Gets a page of SAML Auth provider configs starting from the specified
pageToken. | ||||||||||
| ListProviderConfigsPage<SamlProviderConfig> |
listSamlProviderConfigs(String pageToken, int maxResults)
Gets a page of SAML Auth provider configs starting from the specified
pageToken. | ||||||||||
| ApiFuture<ListProviderConfigsPage<SamlProviderConfig>> |
listSamlProviderConfigsAsync(String pageToken)
Similar to
listSamlProviderConfigs(String) but performs the operation asynchronously. | ||||||||||
| ApiFuture<ListProviderConfigsPage<SamlProviderConfig>> |
listSamlProviderConfigsAsync(String pageToken, int maxResults)
Similar to
listSamlProviderConfigs(String, int) but performs the operation
asynchronously. | ||||||||||
| ListUsersPage |
listUsers(String pageToken, int maxResults)
Gets a page of users starting from the specified
pageToken. | ||||||||||
| ListUsersPage |
listUsers(String pageToken)
Gets a page of users starting from the specified
pageToken. | ||||||||||
| ApiFuture<ListUsersPage> |
listUsersAsync(String pageToken, int maxResults)
Similar to
listUsers(String, int) but performs the operation asynchronously. | ||||||||||
| ApiFuture<ListUsersPage> |
listUsersAsync(String pageToken)
Similar to
listUsers(String) but performs the operation asynchronously. | ||||||||||
| void |
revokeRefreshTokens(String uid)
Revokes all refresh tokens for the specified user.
| ||||||||||
| ApiFuture<Void> |
revokeRefreshTokensAsync(String uid)
Similar to
revokeRefreshTokens(String) but performs the operation asynchronously. | ||||||||||
| void |
setCustomClaims(String uid, Map<String, Object> claims)
This method is deprecated.
Use
setCustomUserClaims(String, Map) instead.
| ||||||||||
| void |
setCustomUserClaims(String uid, Map<String, Object> claims)
Sets the specified custom claims on an existing user account.
| ||||||||||
| ApiFuture<Void> |
setCustomUserClaimsAsync(String uid, Map<String, Object> claims)
Similar to
setCustomUserClaims(String, Map) but performs the operation asynchronously. | ||||||||||
| OidcProviderConfig |
updateOidcProviderConfig(OidcProviderConfig.UpdateRequest request)
Updates an existing OpenID Connect auth provider config with the attributes contained in the
specified
OidcProviderConfig.UpdateRequest. | ||||||||||
| ApiFuture<OidcProviderConfig> |
updateOidcProviderConfigAsync(OidcProviderConfig.UpdateRequest request)
Similar to
updateOidcProviderConfig(OidcProviderConfig.UpdateRequest) but performs the operation asynchronously. | ||||||||||
| SamlProviderConfig |
updateSamlProviderConfig(SamlProviderConfig.UpdateRequest request)
Updates an existing SAML Auth provider config with the attributes contained in the specified
SamlProviderConfig.UpdateRequest. | ||||||||||
| ApiFuture<SamlProviderConfig> |
updateSamlProviderConfigAsync(SamlProviderConfig.UpdateRequest request)
Similar to
updateSamlProviderConfig(SamlProviderConfig.UpdateRequest) but performs the operation asynchronously. | ||||||||||
| UserRecord |
updateUser(UserRecord.UpdateRequest request)
Updates an existing user account with the attributes contained in the specified
UserRecord.UpdateRequest. | ||||||||||
| ApiFuture<UserRecord> |
updateUserAsync(UserRecord.UpdateRequest request)
Similar to
updateUser(UserRecord.UpdateRequest) but performs the operation asynchronously. | ||||||||||
| FirebaseToken |
verifyIdToken(String idToken, boolean checkRevoked)
Parses and verifies a Firebase ID Token.
| ||||||||||
| FirebaseToken |
verifyIdToken(String idToken)
Parses and verifies a Firebase ID Token.
| ||||||||||
| ApiFuture<FirebaseToken> |
verifyIdTokenAsync(String idToken)
Similar to
verifyIdToken(String) but performs the operation asynchronously. | ||||||||||
| ApiFuture<FirebaseToken> |
verifyIdTokenAsync(String idToken, boolean checkRevoked)
Similar to
verifyIdToken(String, boolean) but performs the operation asynchronously. | ||||||||||
| FirebaseToken |
verifySessionCookie(String cookie, boolean checkRevoked)
Parses and verifies a Firebase session cookie.
| ||||||||||
| FirebaseToken |
verifySessionCookie(String cookie)
Parses and verifies a Firebase session cookie.
| ||||||||||
| ApiFuture<FirebaseToken> |
verifySessionCookieAsync(String cookie, boolean checkRevoked)
Similar to
verifySessionCookie(String, boolean) but performs the operation
asynchronously. | ||||||||||
| ApiFuture<FirebaseToken> |
verifySessionCookieAsync(String cookie)
Similar to
verifySessionCookie(String) but performs the operation asynchronously. | ||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static <T extends Builder<T>> T | populateBuilderFromApp(Builder<T> builder, FirebaseApp app, String tenantId) | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Creates a Firebase custom token for the given UID. This token can then be sent back to a client application to be used with the signInWithCustomToken authentication API.
FirebaseApp must have been initialized with service account credentials to use call
this method.
| uid | The UID to store in the token. This identifies the user to other Firebase services (Realtime Database, Firebase Auth, etc.). Should be less than 128 characters. |
|---|
| IllegalArgumentException | If the specified uid is null or empty, or if the app has not been initialized with service account credentials. |
|---|---|
| FirebaseAuthException | If an error occurs while generating the custom token. |
Creates a Firebase custom token for the given UID, containing the specified additional claims. This token can then be sent back to a client application to be used with the signInWithCustomToken authentication API.
This method attempts to generate a token using:
FirebaseApp's service account credentials, if provided at
initialization.
setServiceAccountId(String).
This method throws an exception when all the above fail.
| uid | The UID to store in the token. This identifies the user to other Firebase services (Realtime Database, Firebase Auth, etc.). Should be less than 128 characters. |
|---|---|
| developerClaims | Additional claims to be stored in the token (and made available to security rules in Database, Storage, etc.). These must be able to be serialized to JSON (e.g. contain only Maps, Arrays, Strings, Booleans, Numbers, etc.) |
| IllegalArgumentException | If the specified uid is null or empty. |
|---|---|
| IllegalStateException | If the SDK fails to discover a viable approach for signing tokens. |
| FirebaseAuthException | If an error occurs while generating the custom token. |
Similar to createCustomToken(String, Map) but performs the operation asynchronously.
| uid | The UID to store in the token. This identifies the user to other Firebase services (Realtime Database, Storage, etc.). Should be less than 128 characters. |
|---|---|
| developerClaims | Additional claims to be stored in the token (and made available to security rules in Database, Storage, etc.). These must be able to be serialized to JSON (e.g. contain only Maps, Arrays, Strings, Booleans, Numbers, etc.) |
ApiFuture which will complete successfully with the created Firebase custom
token, or unsuccessfully with the failure Exception.| IllegalArgumentException | If the specified uid is null or empty, or if the app has not been initialized with service account credentials. |
|---|
Similar to createCustomToken(String) but performs the operation asynchronously.
| uid | The UID to store in the token. This identifies the user to other Firebase services (Realtime Database, Firebase Auth, etc.). Should be less than 128 characters. |
|---|
ApiFuture which will complete successfully with the created Firebase custom
token, or unsuccessfully with the failure Exception.| IllegalArgumentException | If the specified uid is null or empty, or if the app has not been initialized with service account credentials. |
|---|
Creates a new OpenID Connect auth provider config with the attributes contained in the
specified OidcProviderConfig.CreateRequest.
| request | A non-null OidcProviderConfig.CreateRequest instance. |
|---|
OidcProviderConfig instance corresponding to the newly created provider
config.| NullPointerException | if the provided request is null. |
|---|---|
| IllegalArgumentException | If the provider ID string is null or empty, or is not prefixed with 'oidc.'. |
| FirebaseAuthException | if an error occurs while creating the provider config. |
Similar to createOidcProviderConfig(OidcProviderConfig.CreateRequest) but performs the operation asynchronously.
| request | A non-null OidcProviderConfig.CreateRequest instance. |
|---|
ApiFuture which will complete successfully with a OidcProviderConfig
instance corresponding to the newly created provider config. If an error occurs while
creating the provider config, the future throws a FirebaseAuthException.| NullPointerException | if the provided request is null. |
|---|---|
| IllegalArgumentException | If the provider ID string is null or empty, or is not prefixed with 'oidc.'. |
Creates a new SAML Auth provider config with the attributes contained in the specified
SamlProviderConfig.CreateRequest.
| request | A non-null SamlProviderConfig.CreateRequest instance. |
|---|
SamlProviderConfig instance corresponding to the newly created provider
config.| NullPointerException | if the provided request is null. |
|---|---|
| IllegalArgumentException | If the provider ID string is null or empty, or is not prefixed with 'saml'. |
| FirebaseAuthException | if an error occurs while creating the provider config. |
Similar to createSamlProviderConfig(SamlProviderConfig.CreateRequest) but performs the operation asynchronously.
| request | A non-null SamlProviderConfig.CreateRequest instance. |
|---|
ApiFuture which will complete successfully with a SamlProviderConfig
instance corresponding to the newly created provider config. If an error occurs while
creating the provider config, the future throws a FirebaseAuthException.| NullPointerException | if the provided request is null. |
|---|---|
| IllegalArgumentException | If the provider ID string is null or empty, or is not prefixed with 'saml'. |
Creates a new Firebase session cookie from the given ID token and options. The returned JWT can be set as a server-side session cookie with a custom cookie policy.
| idToken | The Firebase ID token to exchange for a session cookie. |
|---|---|
| options | Additional options required to create the cookie. |
| IllegalArgumentException | If the ID token is null or empty, or if options is null. |
|---|---|
| FirebaseAuthException | If an error occurs while generating the session cookie. |
Similar to createSessionCookie(String, SessionCookieOptions) but performs the
operation asynchronously.
| idToken | The Firebase ID token to exchange for a session cookie. |
|---|---|
| options | Additional options required to create the cookie. |
ApiFuture which will complete successfully with a session cookie string. If
an error occurs while generating the cookie or if the specified ID token is invalid, the
future throws a FirebaseAuthException.| IllegalArgumentException | If the ID token is null or empty, or if options is null. |
|---|
Creates a new user account with the attributes contained in the specified UserRecord.CreateRequest.
| request | A non-null UserRecord.CreateRequest instance. |
|---|
UserRecord instance corresponding to the newly created account.| NullPointerException | if the provided request is null. |
|---|---|
| FirebaseAuthException | if an error occurs while creating the user account. |
Similar to createUser(UserRecord.CreateRequest) but performs the operation asynchronously.
| request | A non-null UserRecord.CreateRequest instance. |
|---|
ApiFuture which will complete successfully with a UserRecord
instance corresponding to the newly created account. If an error occurs while creating the
user account, the future throws a FirebaseAuthException.| NullPointerException | if the provided request is null. |
|---|
Deletes the OpenID Connect auth provider config identified by the specified provider ID.
| providerId | A provider ID string. |
|---|
| IllegalArgumentException | If the provider ID string is null or empty, or is not prefixed with 'oidc'. |
|---|---|
| FirebaseAuthException | If an error occurs while deleting the provider config. |
Similar to deleteOidcProviderConfig(String) but performs the operation asynchronously.
| providerId | A provider ID string. |
|---|
ApiFuture which will complete successfully when the specified provider
config has been deleted. If an error occurs while deleting the provider config, the future
throws a FirebaseAuthException.| IllegalArgumentException | If the provider ID string is null or empty, or is not prefixed with "oidc.". |
|---|
Deletes the SAML Auth provider config identified by the specified provider ID.
| providerId | A provider ID string. |
|---|
| IllegalArgumentException | If the provider ID string is null or empty, or is not prefixed with "saml.". |
|---|---|
| FirebaseAuthException | If an error occurs while deleting the provider config. |
Similar to deleteSamlProviderConfig(String) but performs the operation asynchronously.
| providerId | A provider ID string. |
|---|
ApiFuture which will complete successfully when the specified provider
config has been deleted. If an error occurs while deleting the provider config, the future
throws a FirebaseAuthException.| IllegalArgumentException | If the provider ID string is null or empty, or is not prefixed with "saml.". |
|---|
Deletes the user identified by the specified user ID.
| uid | A user ID string. |
|---|
| IllegalArgumentException | If the user ID string is null or empty. |
|---|---|
| FirebaseAuthException | If an error occurs while deleting the user. |
Similar to deleteUser(String) but performs the operation asynchronously.
| uid | A user ID string. |
|---|
ApiFuture which will complete successfully when the specified user account
has been deleted. If an error occurs while deleting the user account, the future throws a
FirebaseAuthException.| IllegalArgumentException | If the user ID string is null or empty. |
|---|
Deletes the users specified by the given identifiers.
Deleting a non-existing user does not generate an error (the method is idempotent). Non-existing users are considered to be successfully deleted and are therefore included in the DeleteUsersResult.getSuccessCount() value.
A maximum of 1000 identifiers may be supplied. If more than 1000 identifiers are
supplied, this method throws an IllegalArgumentException.
This API has a rate limit of 1 QPS. Exceeding the limit may result in a quota exceeded error. If you want to delete more than 1000 users, we suggest adding a delay to ensure you don't exceed this limit.
| uids | The uids of the users to be deleted. Must have <= 1000 entries. |
|---|
| IllegalArgumentException | If any of the identifiers are invalid or if more than 1000 identifiers are specified. |
|---|---|
| FirebaseAuthException | If an error occurs while deleting users. |
Similar to deleteUsers(List) but performs the operation asynchronously.
| uids | The uids of the users to be deleted. Must have <= 1000 entries. |
|---|
ApiFuture that resolves to the total number of successful/failed
deletions, as well as the array of errors that correspond to the failed deletions. If an
error occurs while deleting the user account, the future throws a
FirebaseAuthException.| IllegalArgumentException | If any of the identifiers are invalid or if more than 1000 identifiers are specified. |
|---|
Generates the out-of-band email action link for email verification flows for the specified email address, using the action code settings provided.
| The email of the user to be verified. |
| IllegalArgumentException | If the email address is null or empty. |
|---|---|
| FirebaseAuthException | If an error occurs while generating the link. |
Generates the out-of-band email action link for email verification flows for the specified email address.
| The email of the user to be verified. |
| IllegalArgumentException | If the email address is null or empty. |
|---|---|
| FirebaseAuthException | If an error occurs while generating the link. |
Similar to generateEmailVerificationLink(String, ActionCodeSettings) but performs the
operation asynchronously.
| The email of the user to be verified. | |
| settings | The action code settings object which defines whether the link is to be handled by a mobile app and the additional state information to be passed in the deep link. |
ApiFuture which will complete successfully with the generated email action
link. If an error occurs while generating the link, the future throws a FirebaseAuthException.| IllegalArgumentException | If the email address is null or empty. |
|---|
Similar to generateEmailVerificationLink(String) but performs the operation
asynchronously.
| The email of the user to be verified. |
ApiFuture which will complete successfully with the generated email action
link. If an error occurs while generating the link, the future throws a FirebaseAuthException.| IllegalArgumentException | If the email address is null or empty. |
|---|
Generates the out-of-band email action link for password reset flows for the specified email address.
| The email of the user whose password is to be reset. | |
| settings | The action code settings object which defines whether the link is to be handled by a mobile app and the additional state information to be passed in the deep link. |
| IllegalArgumentException | If the email address is null or empty. |
|---|---|
| FirebaseAuthException | If an error occurs while generating the link. |
Generates the out-of-band email action link for password reset flows for the specified email address.
| The email of the user whose password is to be reset. |
| IllegalArgumentException | If the email address is null or empty. |
|---|---|
| FirebaseAuthException | If an error occurs while generating the link. |
Similar to generatePasswordResetLink(String, ActionCodeSettings) but performs the
operation asynchronously.
| The email of the user whose password is to be reset. | |
| settings | The action code settings object which defines whether the link is to be handled by a mobile app and the additional state information to be passed in the deep link. |
ApiFuture which will complete successfully with the generated email action
link. If an error occurs while generating the link, the future throws a FirebaseAuthException.| IllegalArgumentException | If the email address is null or empty. |
|---|
Similar to generatePasswordResetLink(String) but performs the operation
asynchronously.
| The email of the user whose password is to be reset. |
ApiFuture which will complete successfully with the generated email action
link. If an error occurs while generating the link, the future throws a FirebaseAuthException.| IllegalArgumentException | If the email address is null or empty. |
|---|
Generates the out-of-band email action link for email link sign-in flows, using the action code settings provided.
| The email of the user signing in. | |
| settings | The action code settings object which defines whether the link is to be handled by a mobile app and the additional state information to be passed in the deep link. |
| IllegalArgumentException | If the email address is null or empty. |
|---|---|
| FirebaseAuthException | If an error occurs while generating the link. |
Similar to generateSignInWithEmailLink(String, ActionCodeSettings) but performs the
operation asynchronously.
| The email of the user signing in. | |
| settings | The action code settings object which defines whether the link is to be handled by a mobile app and the additional state information to be passed in the deep link. |
ApiFuture which will complete successfully with the generated email action
link. If an error occurs while generating the link, the future throws a FirebaseAuthException.| IllegalArgumentException | If the email address is null or empty. |
|---|---|
| NullPointerException | If the settings is null. |
Gets the OpenID Connect auth provider corresponding to the specified provider ID.
| providerId | A provider ID string. |
|---|
OidcProviderConfig instance.| IllegalArgumentException | If the provider ID string is null or empty, or is not prefixed with 'oidc'. |
|---|---|
| FirebaseAuthException | If an error occurs while retrieving the provider config. |
Similar to getOidcProviderConfig(String) but performs the operation asynchronously.
Page size is limited to 100 provider configs.
| providerId | A provider ID string. |
|---|
ApiFuture which will complete successfully with an
OidcProviderConfig instance. If an error occurs while retrieving the provider
config or if the specified provider ID does not exist, the future throws a
FirebaseAuthException.| IllegalArgumentException | If the provider ID string is null or empty, or is not prefixed with 'oidc.'. |
|---|
Gets the SAML Auth provider config corresponding to the specified provider ID.
| providerId | A provider ID string. |
|---|
SamlProviderConfig instance.| IllegalArgumentException | If the provider ID string is null or empty, or is not prefixed with 'saml'. |
|---|---|
| FirebaseAuthException | If an error occurs while retrieving the provider config. |
Similar to getSamlProviderConfig(String) but performs the operation asynchronously.
Page size is limited to 100 provider configs.
| providerId | A provider ID string. |
|---|
ApiFuture which will complete successfully with an
SamlProviderConfig instance. If an error occurs while retrieving the provider
config or if the specified provider ID does not exist, the future throws a
FirebaseAuthException.| IllegalArgumentException | If the provider ID string is null or empty, or is not prefixed with 'saml'. |
|---|
Gets the user data corresponding to the specified user ID.
| uid | A user ID string. |
|---|
UserRecord instance.| IllegalArgumentException | If the user ID string is null or empty. |
|---|---|
| FirebaseAuthException | If an error occurs while retrieving user data. |
Similar to getUser(String) but performs the operation asynchronously.
| uid | A user ID string. |
|---|
ApiFuture which will complete successfully with a UserRecord
instance. If an error occurs while retrieving user data or if the specified user ID does
not exist, the future throws a FirebaseAuthException.| IllegalArgumentException | If the user ID string is null or empty. |
|---|
Gets the user data corresponding to the specified user email.
| A user email address string. |
UserRecord instance.| IllegalArgumentException | If the email is null or empty. |
|---|---|
| FirebaseAuthException | If an error occurs while retrieving user data. |
Similar to getUserByEmail(String) but performs the operation asynchronously.
| A user email address string. |
ApiFuture which will complete successfully with a UserRecord
instance. If an error occurs while retrieving user data or if the email address does not
correspond to a user, the future throws a FirebaseAuthException.| IllegalArgumentException | If the email is null or empty. |
|---|
Gets the user data corresponding to the specified user phone number.
| phoneNumber | A user phone number string. |
|---|
UserRecord instance.| IllegalArgumentException | If the phone number is null or empty. |
|---|---|
| FirebaseAuthException | If an error occurs while retrieving user data. |
Gets the user data corresponding to the specified user phone number.
| phoneNumber | A user phone number string. |
|---|
ApiFuture which will complete successfully with a UserRecord
instance. If an error occurs while retrieving user data or if the phone number does not
correspond to a user, the future throws a FirebaseAuthException.| IllegalArgumentException | If the phone number is null or empty. |
|---|
Gets the user data for the user corresponding to a given provider ID.
| providerId | Identifier for the given federated provider: for example, "google.com" for the Google provider. |
|---|---|
| uid | The user identifier with the given provider. |
UserRecord instance.| IllegalArgumentException | If the uid is null or empty, or if the providerId is null, empty, or does not belong to a federated provider. |
|---|---|
| FirebaseAuthException | If an error occurs while retrieving user data. |
Gets the user data for the user corresponding to a given provider ID.
| providerId | Identifer for the given federated provider: for example, "google.com" for the Google provider. |
|---|---|
| uid | The user identifier with the given provider. |
ApiFuture which will complete successfully with a UserRecord
instance. If an error occurs while retrieving user data or if the provider ID and uid
do not correspond to a user, the future throws a FirebaseAuthException.| IllegalArgumentException | If the uid is null or empty, or if the provider ID is null, empty, or does not belong to a federated provider. |
|---|
Gets the user data corresponding to the specified identifiers.
There are no ordering guarantees; in particular, the nth entry in the users result list is not guaranteed to correspond to the nth entry in the input parameters list.
A maximum of 100 identifiers may be specified. If more than 100 identifiers are
supplied, this method throws an IllegalArgumentException.
| identifiers | The identifiers used to indicate which user records should be returned. Must have 100 or fewer entries. |
|---|
| IllegalArgumentException | If any of the identifiers are invalid or if more than 100 identifiers are specified. |
|---|---|
| NullPointerException | If the identifiers parameter is null. |
| FirebaseAuthException | If an error occurs while retrieving user data. |
Gets the user data corresponding to the specified identifiers.
There are no ordering guarantees; in particular, the nth entry in the users result list is not guaranteed to correspond to the nth entry in the input parameters list.
A maximum of 100 identifiers may be specified. If more than 100 identifiers are
supplied, this method throws an IllegalArgumentException.
| identifiers | The identifiers used to indicate which user records should be returned. Must have 100 or fewer entries. |
|---|
ApiFuture that resolves to the corresponding user records.| IllegalArgumentException | If any of the identifiers are invalid or if more than 100 identifiers are specified. |
|---|---|
| NullPointerException | If the identifiers parameter is null. |
Imports the provided list of users into Firebase Auth. At most 1000 users can be imported at a time. This operation is optimized for bulk imports and will ignore checks on identifier uniqueness which could result in duplications.
UserImportOptions is required to import users with passwords. See importUsers(List, UserImportOptions).
| users | A non-empty list of users to be imported. Length must not exceed 1000. |
|---|
UserImportResult instance.| IllegalArgumentException | If the users list is null, empty or has more than 1000 elements. Or if at least one user specifies a password. |
|---|---|
| FirebaseAuthException | If an error occurs while importing users. |
Imports the provided list of users into Firebase Auth. At most 1000 users can be imported at a time. This operation is optimized for bulk imports and will ignore checks on identifier uniqueness which could result in duplications.
| users | A non-empty list of users to be imported. Length must not exceed 1000. |
|---|---|
| options | a UserImportOptions instance or null. Required when importing users with
passwords. |
UserImportResult instance.| IllegalArgumentException | If the users list is null, empty or has more than 1000 elements. Or if at least one user specifies a password, and options is null. |
|---|---|
| FirebaseAuthException | If an error occurs while importing users. |
Similar to importUsers(List) but performs the operation asynchronously.
| users | A non-empty list of users to be imported. Length must not exceed 1000. |
|---|
ApiFuture which will complete successfully when the user accounts are
imported. If an error occurs while importing the users, the future throws a FirebaseAuthException.| IllegalArgumentException | If the users list is null, empty or has more than 1000 elements. Or if at least one user specifies a password. |
|---|
Similar to importUsers(List, UserImportOptions) but performs the operation
asynchronously.
| users | A non-empty list of users to be imported. Length must not exceed 1000. |
|---|---|
| options | a UserImportOptions instance or null. Required when importing users with
passwords. |
ApiFuture which will complete successfully when the user accounts are
imported. If an error occurs while importing the users, the future throws a FirebaseAuthException.| IllegalArgumentException | If the users list is null, empty or has more than 1000 elements. Or if at least one user specifies a password, and options is null. |
|---|
Gets a page of OpenID Connect auth provider configs starting from the specified
pageToken. Page size is limited to 100 provider configs.
| pageToken | A non-empty page token string, or null to retrieve the first page of provider configs. |
|---|
ListProviderConfigsPage instance.| IllegalArgumentException | If the specified page token is empty |
|---|---|
| FirebaseAuthException | If an error occurs while retrieving provider config data. |
Gets a page of OpenID Connect auth provider configs starting from the specified
pageToken.
| pageToken | A non-empty page token string, or null to retrieve the first page of provider configs. |
|---|---|
| maxResults | Maximum number of provider configs to include in the returned page. This may not exceed 100. |
ListProviderConfigsPage instance.| IllegalArgumentException | If the specified page token is empty, or max results value is invalid. |
|---|---|
| FirebaseAuthException | If an error occurs while retrieving provider config data. |
Similar to listOidcProviderConfigs(String) but performs the operation asynchronously.
Page size is limited to 100 provider configs.
| pageToken | A non-empty page token string, or null to retrieve the first page of provider configs. |
|---|
ApiFuture which will complete successfully with a
ListProviderConfigsPage instance. If an error occurs while retrieving provider
config data, the future throws an exception.| IllegalArgumentException | If the specified page token is empty. |
|---|
Similar to listOidcProviderConfigs(String, int) but performs the operation
asynchronously.
| pageToken | A non-empty page token string, or null to retrieve the first page of provider configs. |
|---|---|
| maxResults | Maximum number of provider configs to include in the returned page. This may not exceed 100. |
ApiFuture which will complete successfully with a
ListProviderConfigsPage instance. If an error occurs while retrieving provider
config data, the future throws an exception.| IllegalArgumentException | If the specified page token is empty, or max results value is invalid. |
|---|
Gets a page of SAML Auth provider configs starting from the specified pageToken. Page
size is limited to 100 provider configs.
| pageToken | A non-empty page token string, or null to retrieve the first page of provider configs. |
|---|
ListProviderConfigsPage instance.| IllegalArgumentException | If the specified page token is empty. |
|---|---|
| FirebaseAuthException | If an error occurs while retrieving provider config data. |
Gets a page of SAML Auth provider configs starting from the specified pageToken.
| pageToken | A non-empty page token string, or null to retrieve the first page of provider configs. |
|---|---|
| maxResults | Maximum number of provider configs to include in the returned page. This may not exceed 100. |
ListProviderConfigsPage instance.| IllegalArgumentException | If the specified page token is empty, or max results value is invalid. |
|---|---|
| FirebaseAuthException | If an error occurs while retrieving provider config data. |
Similar to listSamlProviderConfigs(String) but performs the operation asynchronously.
Page size is limited to 100 provider configs.
| pageToken | A non-empty page token string, or null to retrieve the first page of provider configs. |
|---|
ApiFuture which will complete successfully with a
ListProviderConfigsPage instance. If an error occurs while retrieving provider
config data, the future throws an exception.| IllegalArgumentException | If the specified page token is empty. |
|---|
Similar to listSamlProviderConfigs(String, int) but performs the operation
asynchronously.
| pageToken | A non-empty page token string, or null to retrieve the first page of provider configs. |
|---|---|
| maxResults | Maximum number of provider configs to include in the returned page. This may not exceed 100. |
ApiFuture which will complete successfully with a
ListProviderConfigsPage instance. If an error occurs while retrieving provider
config data, the future throws an exception.| IllegalArgumentException | If the specified page token is empty, or max results value is invalid. |
|---|
Gets a page of users starting from the specified pageToken.
| pageToken | A non-empty page token string, or null to retrieve the first page of users. |
|---|---|
| maxResults | Maximum number of users to include in the returned page. This may not exceed 1000. |
ListUsersPage instance.| IllegalArgumentException | If the specified page token is empty, or max results value is invalid. |
|---|---|
| FirebaseAuthException | If an error occurs while retrieving user data. |
Gets a page of users starting from the specified pageToken. Page size is limited to
1000 users.
| pageToken | A non-empty page token string, or null to retrieve the first page of users. |
|---|
ListUsersPage instance.| IllegalArgumentException | If the specified page token is empty. |
|---|---|
| FirebaseAuthException | If an error occurs while retrieving user data. |
Similar to listUsers(String, int) but performs the operation asynchronously.
| pageToken | A non-empty page token string, or null to retrieve the first page of users. |
|---|---|
| maxResults | Maximum number of users to include in the returned page. This may not exceed 1000. |
ApiFuture which will complete successfully with a ListUsersPage
instance. If an error occurs while retrieving user data, the future throws an exception.| IllegalArgumentException | If the specified page token is empty, or max results value is invalid. |
|---|
Similar to listUsers(String) but performs the operation asynchronously.
| pageToken | A non-empty page token string, or null to retrieve the first page of users. |
|---|
ApiFuture which will complete successfully with a ListUsersPage
instance. If an error occurs while retrieving user data, the future throws an exception.| IllegalArgumentException | If the specified page token is empty. |
|---|
Revokes all refresh tokens for the specified user.
Updates the user's tokensValidAfterTimestamp to the current UTC time expressed in milliseconds since the epoch and truncated to 1 second accuracy. It is important that the server on which this is called has its clock set correctly and synchronized.
While this will revoke all sessions for a specified user and disable any new ID tokens for
existing sessions from getting minted, existing ID tokens may remain active until their natural
expiration (one hour). To verify that ID tokens are revoked, use verifyIdTokenAsync(String, boolean).
| uid | The user id for which tokens are revoked. |
|---|
| IllegalArgumentException | If the user ID is null or empty. |
|---|---|
| FirebaseAuthException | If an error occurs while revoking tokens. |
Similar to revokeRefreshTokens(String) but performs the operation asynchronously.
| uid | The user id for which tokens are revoked. |
|---|
ApiFuture which will complete successfully or fail with a FirebaseAuthException in the event of an error.| IllegalArgumentException | If the user ID is null or empty. |
|---|
This method is deprecated.
Use setCustomUserClaims(String, Map) instead.
| FirebaseAuthException |
|---|
Sets the specified custom claims on an existing user account. A null claims value removes any claims currently set on the user account. The claims should serialize into a valid JSON string. The serialized claims must not be larger than 1000 characters.
| uid | A user ID string. |
|---|---|
| claims | A map of custom claims or null. |
| FirebaseAuthException | If an error occurs while updating custom claims. |
|---|---|
| IllegalArgumentException | If the user ID string is null or empty, or the claims payload is invalid or too large. |
Similar to setCustomUserClaims(String, Map) but performs the operation asynchronously.
| uid | A user ID string. |
|---|---|
| claims | A map of custom claims or null. |
ApiFuture which will complete successfully when the user account has been
updated. If an error occurs while deleting the user account, the future throws a FirebaseAuthException.| IllegalArgumentException | If the user ID string is null or empty. |
|---|
Updates an existing OpenID Connect auth provider config with the attributes contained in the
specified OidcProviderConfig.UpdateRequest.
| request | A non-null OidcProviderConfig.UpdateRequest instance. |
|---|
OidcProviderConfig instance corresponding to the updated provider config.| NullPointerException | if the provided update request is null. |
|---|---|
| IllegalArgumentException | If the provided update request is invalid. |
| FirebaseAuthException | if an error occurs while updating the provider config. |
Similar to updateOidcProviderConfig(OidcProviderConfig.UpdateRequest) but performs the operation asynchronously.
| request | A non-null OidcProviderConfig.UpdateRequest instance. |
|---|
ApiFuture which will complete successfully with a OidcProviderConfig
instance corresponding to the updated provider config. If an error occurs while updating
the provider config, the future throws a FirebaseAuthException.| NullPointerException | if the provided update request is null. |
|---|---|
| IllegalArgumentException | If the provided update request is invalid. |
Updates an existing SAML Auth provider config with the attributes contained in the specified
SamlProviderConfig.UpdateRequest.
| request | A non-null SamlProviderConfig.UpdateRequest instance. |
|---|
SamlProviderConfig instance corresponding to the updated provider config.| NullPointerException | if the provided update request is null. |
|---|---|
| IllegalArgumentException | If the provided update request is invalid. |
| FirebaseAuthException | if an error occurs while updating the provider config. |
Similar to updateSamlProviderConfig(SamlProviderConfig.UpdateRequest) but performs the operation asynchronously.
| request | A non-null SamlProviderConfig.UpdateRequest instance. |
|---|
ApiFuture which will complete successfully with a SamlProviderConfig
instance corresponding to the updated provider config. If an error occurs while updating
the provider config, the future throws a FirebaseAuthException.| NullPointerException | if the provided update request is null. |
|---|---|
| IllegalArgumentException | If the provided update request is invalid. |
Updates an existing user account with the attributes contained in the specified UserRecord.UpdateRequest.
| request | A non-null UserRecord.UpdateRequest instance. |
|---|
UserRecord instance corresponding to the updated user account.| NullPointerException | if the provided update request is null. |
|---|---|
| FirebaseAuthException | if an error occurs while updating the user account. |
Similar to updateUser(UserRecord.UpdateRequest) but performs the operation asynchronously.
| request | A non-null UserRecord.UpdateRequest instance. |
|---|
ApiFuture which will complete successfully with a UserRecord
instance corresponding to the updated user account. If an error occurs while updating the
user account, the future throws a FirebaseAuthException.
Parses and verifies a Firebase ID Token.
A Firebase application can identify itself to a trusted backend server by sending its
Firebase ID Token (accessible via the getToken API in the Firebase Authentication
client) with its requests. The backend server can then use the verifyIdToken() method
to verify that the token is valid. This method ensures that the token is correctly signed, has
not expired, and it was issued to the Firebase project associated with this FirebaseAuth instance.
If checkRevoked is set to true, this method performs an additional check to see if
the ID token has been revoked since it was issues. This requires making an additional remote
API call.
| idToken | A Firebase ID token string to parse and verify. |
|---|---|
| checkRevoked | A boolean denoting whether to check if the tokens were revoked or if the user is disabled. |
FirebaseToken representing the verified and decoded token.| IllegalArgumentException | If the token is null, empty, or if the FirebaseApp
instance does not have a project ID associated with it. |
|---|---|
| FirebaseAuthException | If an error occurs while parsing or validating the token, or if the user is disabled. |
Parses and verifies a Firebase ID Token.
A Firebase application can identify itself to a trusted backend server by sending its
Firebase ID Token (accessible via the getToken API in the Firebase Authentication
client) with its requests. The backend server can then use the verifyIdToken() method
to verify that the token is valid. This method ensures that the token is correctly signed, has
not expired, and it was issued to the Firebase project associated with this FirebaseAuth instance.
This method does not check whether a token has been revoked. Use verifyIdToken(String, boolean) to perform an additional revocation check.
| idToken | A Firebase ID token string to parse and verify. |
|---|
FirebaseToken representing the verified and decoded token.| IllegalArgumentException | If the token is null, empty, or if the FirebaseApp
instance does not have a project ID associated with it. |
|---|---|
| FirebaseAuthException | If an error occurs while parsing or validating the token. |
Similar to verifyIdToken(String) but performs the operation asynchronously.
| idToken | A Firebase ID Token to verify and parse. |
|---|
ApiFuture which will complete successfully with the parsed token, or
unsuccessfully with a FirebaseAuthException.| IllegalArgumentException | If the token is null, empty, or if the FirebaseApp
instance does not have a project ID associated with it.
|
|---|
Similar to verifyIdToken(String, boolean) but performs the operation asynchronously.
| idToken | A Firebase ID Token to verify and parse. |
|---|---|
| checkRevoked | A boolean denoting whether to check if the tokens were revoked. |
ApiFuture which will complete successfully with the parsed token, or
unsuccessfully with a FirebaseAuthException.| IllegalArgumentException | If the token is null, empty, or if the FirebaseApp
instance does not have a project ID associated with it.
|
|---|
Parses and verifies a Firebase session cookie.
If checkRevoked is true, additionally verifies that the cookie has not been revoked.
If verified successfully, returns a parsed version of the cookie from which the UID and the
other claims can be read. If the cookie is invalid or has been revoked while checkRevoked is true, throws a FirebaseAuthException.
| cookie | A Firebase session cookie string to verify and parse. |
|---|---|
| checkRevoked | A boolean indicating whether to check if the cookie was explicitly revoked or if the user is disabled. |
FirebaseToken representing the verified and decoded cookie.| FirebaseAuthException | If an error occurs while parsing or validating the token, or if the user is disabled. |
|---|
Parses and verifies a Firebase session cookie.
If verified successfully, returns a parsed version of the cookie from which the UID and the
other claims can be read. If the cookie is invalid, throws a FirebaseAuthException.
This method does not check whether the cookie has been revoked. See verifySessionCookie(String, boolean).
| cookie | A Firebase session cookie string to verify and parse. |
|---|
FirebaseToken representing the verified and decoded cookie.
| FirebaseAuthException |
|---|
Similar to verifySessionCookie(String, boolean) but performs the operation
asynchronously.
| cookie | A Firebase session cookie string to verify and parse. |
|---|---|
| checkRevoked | A boolean indicating whether to check if the cookie was explicitly revoked. |
ApiFuture which will complete successfully with the parsed cookie, or
unsuccessfully with the failure Exception.
Similar to verifySessionCookie(String) but performs the operation asynchronously.
| cookie | A Firebase session cookie string to verify and parse. |
|---|
ApiFuture which will complete successfully with the parsed cookie, or
unsuccessfully with the failure Exception.