Ir a la consola

FirebaseAuth

public class FirebaseAuth extends Object

This class is the entry point for all server-side Firebase Authentication actions.

You can get an instance of FirebaseAuth via getInstance(FirebaseApp) and then use it to perform a variety of authentication-related operations, including generating custom tokens for use by client-side code, verifying Firebase ID Tokens received from clients, or creating new FirebaseApp instances that are scoped to a particular authentication UID.

Public Method Summary

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.
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(CreateRequest) 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.
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.
synchronized static FirebaseAuth
getInstance(FirebaseApp app)
Gets an instance of FirebaseAuth for a specific FirebaseApp.
static FirebaseAuth
getInstance()
Gets the FirebaseAuth instance for the default FirebaseApp.
UserRecord
getUser(String uid)
Gets the user data corresponding to the specified user ID.
ApiFuture<UserRecord>
getUserAsync(String uid)
Similar to