Package | com.myflashlab.air.extensions.firebase.auth |
Class | public class FirebaseUser |
Inheritance | FirebaseUser Object |
Property | Defined By | ||
---|---|---|---|
displayName : String [static] [read-only]
Returns the main display name of this user from the Firebase project's user database. | FirebaseUser | ||
email : String [static] [read-only]
Returns the main email address of the user, as stored in the Firebase project's user database. | FirebaseUser | ||
isAnonymous : Boolean [static] [read-only]
Returns true if the user is anonymous; that is, the user account was created with
signInAnonymously() and has not been linked to another account with linkWithCredential(). | FirebaseUser | ||
isAvailable : Boolean [static] [read-only]
Indicates if current user is signed in to your app or not. | FirebaseUser | ||
isEmailVerified : Boolean [static] [read-only]
Returns true if the user's email is verified. | FirebaseUser | ||
listener : EventDispatcher [static] [read-only] | FirebaseUser | ||
metadata : UserMetadata [static] [read-only] | FirebaseUser | ||
phoneNumber : String [static] [read-only]
Returns the phone number of the user, as stored in the Firebase project's user database, or null
if none exists. | FirebaseUser | ||
photoUrl : String [static] [read-only]
Returns the URL of this user's main profile picture, as stored in the Firebase project's user database. | FirebaseUser | ||
providerId : String [static] [read-only]
Always returns AuthProvider.FIREBASE
| FirebaseUser | ||
providersData : Array [static] [read-only]
Returns an Array of UserInfo instance that represents the linked identities of the user using different
authentication providers that may be linked to their account. | FirebaseUser | ||
userId : String [static] [read-only]
Returns a string used to uniquely identify your user in your Firebase project's user database. | FirebaseUser |
Method | Defined By | ||
---|---|---|---|
deleteUser():void [static]
Deletes the user record from your Firebase project's database. | FirebaseUser | ||
getIdToken($forceRefresh:Boolean):void [static]
Fetches a Firebase Auth ID Token for the user; useful when authenticating against your own backend. | FirebaseUser | ||
linkWithCredential($credential:Object):void [static]
Attaches the given $credential to the user. | FirebaseUser | ||
reauthenticate($credential:Object):void [static]
Reauthenticates the user with the given credential. | FirebaseUser | ||
reload():void [static]
Manually refreshes the data of the current user (for example, attached providers, display name, and so on). | FirebaseUser | ||
sendEmailVerification($actionCodeSettings:ActionCodeSettings = null):void [static]
Initiates email verification for the user. | FirebaseUser | ||
unlinkFromCredential($provider:String):void [static]
Detaches credentials from a given provider type from this user. | FirebaseUser | ||
updateEmail($email:String):void [static]
Updates the email address of the user. | FirebaseUser | ||
updatePassword($newPassword:String):void [static]
Updates the password of the user. | FirebaseUser | ||
updatePhoneNumber($credential:Object):void [static] | FirebaseUser | ||
updateProfile($displayName:String = null, $photoUrl:String = null):void [static]
Updates the user profile information. | FirebaseUser |
displayName | property |
displayName:String
[read-only]
Returns the main display name of this user from the Firebase project's user database. Unlike the display name property from instances of UserInfo corresponding to authentication providers (like Google Sign-In), which is not modifiable, this name can be updated at any time by calling updateProfile().
This field will be automatically populated on account creation if the AuthCredential used on signInWithCredential() contained such information.
public static function get displayName():String
See also
property |
email:String
[read-only]
Returns the main email address of the user, as stored in the Firebase project's user database. Unlike the email property from instances of UserInfo corresponding to authentication providers (like Github), which is not modifiable, this email address can be updated at any time by calling updateEmail(String).
This field will be automatically populated on account creation if the AuthCredential used on signInWithCredential() contained such information.
If the user also has a password, this email address can be used to sign in into the account using signInWithEmailAndPassword(String, String).
This email address is displayed in the Users section of the Firebase console.
public static function get email():String
See also
isAnonymous | property |
isAnonymous:Boolean
[read-only] Returns true if the user is anonymous; that is, the user account was created with signInAnonymously() and has not been linked to another account with linkWithCredential().
public static function get isAnonymous():Boolean
isAvailable | property |
isAvailable:Boolean
[read-only]
Indicates if current user is signed in to your app or not. If this returns false
you must not call any
other methods or properties of the FirebaseUser
class.
public static function get isAvailable():Boolean
isEmailVerified | property |
isEmailVerified:Boolean
[read-only]
Returns true
if the user's email is verified.
public static function get isEmailVerified():Boolean
listener | property |
listener:EventDispatcher
[read-only] public static function get listener():EventDispatcher
metadata | property |
phoneNumber | property |
phoneNumber:String
[read-only]
Returns the phone number of the user, as stored in the Firebase project's user database, or null if none exists. This can be updated at any time by calling updatePhoneNumber(PhoneAuthCredential)
public static function get phoneNumber():String
photoUrl | property |
photoUrl:String
[read-only]
Returns the URL of this user's main profile picture, as stored in the Firebase project's user database. Unlike the profile URL property from instances of UserInfo corresponding to authentication providers (like Facebook Login), which is not modifiable, this URL can be updated at any time by calling updateProfile().
This field will be automatically populated on account creation if the AuthCredential used on signInWithCredential() contained such information.
public static function get photoUrl():String
See also
providerId | property |
providerId:String
[read-only]
Always returns AuthProvider.FIREBASE
public static function get providerId():String
providersData | property |
providersData:Array
[read-only] Returns an Array of UserInfo instance that represents the linked identities of the user using different authentication providers that may be linked to their account. Use this to access, for example, your user's basic profile information retrieved from Facebook whether or not the user used Facebook Login to sign in to the current session.
public static function get providersData():Array
userId | property |
userId:String
[read-only]
Returns a string used to uniquely identify your user in your Firebase project's user database. Use it when storing information in Firebase Database or Storage, or even in your own backend.
This identifier is opaque and does not correspond necessarily to the user's email address or any other field.
public static function get userId():String
deleteUser | () | method |
public static function deleteUser():void
Deletes the user record from your Firebase project's database. If the operation is successful, the user will be signed out.
Important: This is a security sensitive operation that requires the user to have recently signed in. If this requirement isn't met, ask the user to authenticate again and later call reauthenticate().
Possible error messages:
getIdToken | () | method |
public static function getIdToken($forceRefresh:Boolean):void
Fetches a Firebase Auth ID Token for the user; useful when authenticating against your own backend. Use our server SDKs or follow the official documentation to securely verify the integrity and validity of this token.
Possible error messages:
Parameters
$forceRefresh:Boolean |
linkWithCredential | () | method |
public static function linkWithCredential($credential:Object):void
Attaches the given $credential to the user. This allows the user to sign in to this account in the future with credentials for such provider.
NOTICE: THIS FEATURE IS ONLY AVAILABLE TO MYFLASHLABS CLUB MEMBERS. If you are a club member, you can link/unlink your user accounts with/from different AuthProviders like Facebook, Twitter, Google, Github and Apple rather than simple email/pass authentication through Firebase. What you current can do with this ANE is good enough for most cases. However by Joining the club, you are supporting the MyFlashLabs Team to be able to do their job with more ease.
Possible error messages:
Parameters
$credential:Object |
reauthenticate | () | method |
public static function reauthenticate($credential:Object):void
Reauthenticates the user with the given credential. This is useful for operations that require a recent
sign-in, to prevent or resolve a Auth.RESULT_AUTH_RECENT_LOGIN_REQUIERD
issue.
Possible error messages:
Parameters
$credential:Object — authentication credential that must be valid for the current user.
|
reload | () | method |
public static function reload():void
Manually refreshes the data of the current user (for example, attached providers, display name, and so on).
Possible error messages:
sendEmailVerification | () | method |
public static function sendEmailVerification($actionCodeSettings:ActionCodeSettings = null):void
Initiates email verification for the user. Optionally Takes in an ActionCodeSettings to allow linking back to your app in the email.
Parameters
$actionCodeSettings:ActionCodeSettings (default = null )
|
unlinkFromCredential | () | method |
public static function unlinkFromCredential($provider:String):void
Detaches credentials from a given provider type from this user. This prevents the user from signing in to this account in the future with credentials from such provider.
NOTICE: THIS FEATURE IS ONLY AVAILABLE TO MYFLASHLABS CLUB MEMBERS. If you are a club member, you can link/unlink your user accounts with/from different AuthProviders like Facebook, Twitter, Google, Github and Apple rather than simple email/pass authentication through Firebase. What you current can do with this ANE is good enough for most cases. However by Joining the club, you are supporting the MyFlashLabs Team to be able to do their job with. more ease.
Possible error messages:
Parameters
$provider:String — a unique identifier of the type of provider to be unlinked, for example AuthProvider.GOOGLE
|
updateEmail | () | method |
public static function updateEmail($email:String):void
Updates the email address of the user.
Important: This is a security sensitive operation that requires the user to have recently signed in. If this requirement isn't met, ask the user to authenticate again and later call reauthenticate().
In addition, note that the original email address recipient will receive an email that allows them to revoke the email address change, in order to protect them from account hijacking.
Possible error messages:
Parameters
$email:String |
updatePassword | () | method |
public static function updatePassword($newPassword:String):void
Updates the password of the user.
Important: This is a security sensitive operation that requires the user to have recently signed in. If this requirement isn't met, ask the user to authenticate again and later call reauthenticate().
Possible error messages:
Parameters
$newPassword:String |
updatePhoneNumber | () | method |
public static function updatePhoneNumber($credential:Object):void
Parameters
$credential:Object |
updateProfile | () | method |
public static function updateProfile($displayName:String = null, $photoUrl:String = null):void
Updates the user profile information. If you don't wish to change a property, pass in null or an empty String.
Possible error messages:
Parameters
$displayName:String (default = null )
| |
$photoUrl:String (default = null )
|