Package | com.distriqt.extension.firebase.auth.user |
Interface | public interface FirebaseUser extends flash.events.IEventDispatcher |
Property | Defined By | ||
---|---|---|---|
displayName : String [read-only]
The main display name of this user from the Firebase project's user database. | FirebaseUser | ||
email : String [read-only]
The main email address of the user, as stored in the Firebase project's user database. | FirebaseUser | ||
identifier : String [read-only]
Returns a string used to uniquely identify your user in your Firebase project's user database. | FirebaseUser | ||
phoneNumber : String [read-only]
The phone number of the user, as stored in the Firebase project's user database
| FirebaseUser | ||
photoUrl : String [read-only]
The URL of this user's main profile picture, as stored in the Firebase project's user database. | FirebaseUser | ||
providers : Vector.<UserInfo> [read-only]
An array of UserInfo objects 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. | FirebaseUser |
Method | Defined By | ||
---|---|---|---|
deleteUser():void
Deletes the user record from your Firebase project's database. | FirebaseUser | ||
getToken(forceRefresh:Boolean):Boolean
Fetches a Firebase Auth ID Token for the user; useful when authenticating against your own backend. | FirebaseUser | ||
isAnonymous():Boolean
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(AuthCredential). | FirebaseUser | ||
linkWithCredential(credential:AuthCredential):void
Attaches the given AuthCredential to the user. | FirebaseUser | ||
reauthenticate(credential:AuthCredential):void
Reauthenticates the user with the given credential. | FirebaseUser | ||
reload():Boolean
Manually refreshes the data of the current user (for example, attached providers, display name, and so on). | FirebaseUser | ||
sendEmailVerification():void
Initiates email verification for the user. | FirebaseUser | ||
unlink(providerId:String):void
Detaches credentials from a given provider type from this user. | FirebaseUser | ||
updateEmail(email:String):void
Updates the email address of the user. | FirebaseUser | ||
updatePassword(password:String):void
Updates the password of the user. | FirebaseUser | ||
updateProfile(request:UserProfileChangeRequest):void
Updates the user profile information. | FirebaseUser |
Event | Summary | Defined By | ||
---|---|---|---|---|
FirebaseUser | ||||
Dispatched when a call to getToken has completed. | FirebaseUser | |||
FirebaseUser | ||||
FirebaseUser | ||||
Dispatched when a call to FirebaseUser.reload has completed. | FirebaseUser | |||
FirebaseUser | ||||
FirebaseUser | ||||
FirebaseUser | ||||
FirebaseUser | ||||
FirebaseUser |
displayName | property |
displayName:String
[read-only] The main display name of this user from the Firebase project's user database.
public function get displayName():String
property |
email:String
[read-only] The main email address of the user, as stored in the Firebase project's user database.
public function get email():String
identifier | property |
identifier: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 function get identifier():String
phoneNumber | property |
phoneNumber:String
[read-only] The phone number of the user, as stored in the Firebase project's user database
public function get phoneNumber():String
photoUrl | property |
photoUrl:String
[read-only] The URL of this user's main profile picture, as stored in the Firebase project's user database.
public function get photoUrl():String
providers | property |
providers:Vector.<UserInfo>
[read-only]
An array of UserInfo
objects 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 function get providers():Vector.<UserInfo>
deleteUser | () | method |
public 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(AuthCredential)
.
Will dispatch a FirebaseUserEvent.DELETE_USER_COMPLETE
when this completes.
getToken | () | method |
public function getToken(forceRefresh:Boolean):Boolean
Fetches a Firebase Auth ID Token for the user; useful when authenticating against your own backend.
Use the server SDKs or follow the official documentation to securely verify the integrity and validity of this token.
Will dispatch a FirebaseUserEvent.GET_TOKEN_COMPLETE
when this completes with the token in the event
if successful.
Parameters
forceRefresh:Boolean — force refreshes the token. Should only be set to true if the token is invalidated out of band.
|
Boolean — true if the fetch was started successfully and false otherwise, most likely that there was an error with the user authentication.
|
isAnonymous | () | method |
public function isAnonymous():Boolean
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(AuthCredential)
.
Boolean |
linkWithCredential | () | method |
public function linkWithCredential(credential:AuthCredential):void
Attaches the given AuthCredential to the user.
This allows the user to sign in to this account in the future with credentials for such provider.
Will dispatch a FirebaseUserEvent.LINK_WITH_CREDENTIAL_COMPLETE
when this completes.
Parameters
credential:AuthCredential |
reauthenticate | () | method |
public function reauthenticate(credential:AuthCredential):void
Reauthenticates the user with the given credential. This is useful for operations that require a recent sign-in
Will dispatch a FirebaseUserEvent.REAUTHENTICATE_COMPLETE
when this completes.
Parameters
credential:AuthCredential |
reload | () | method |
public function reload():Boolean
Manually refreshes the data of the current user (for example, attached providers, display name, and so on).
Will dispatch a FirebaseUserEvent.UNLINK_COMPLETE
when this completes.
Boolean |
sendEmailVerification | () | method |
public function sendEmailVerification():void
Initiates email verification for the user.
Will dispatch a FirebaseUserEvent.SEND_EMAIL_VERIFICATION_COMPLETE
when this completes.
unlink | () | method |
public function unlink(providerId: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.
Will dispatch a FirebaseUserEvent.UNLINK_COMPLETE
when this completes.
Parameters
providerId:String |
updateEmail | () | method |
public 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(AuthCredential)
.
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.
Will dispatch a FirebaseUserEvent.UPDATE_EMAIL_COMPLETE
when this completes.
Parameters
email:String — New email address of the user
|
updatePassword | () | method |
public function updatePassword(password: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(AuthCredential)
.
Will dispatch a FirebaseUserEvent.UPDATE_PASSWORD_COMPLETE
when this completes.
Parameters
password:String — New password of the user
|
updateProfile | () | method |
public function updateProfile(request:UserProfileChangeRequest):void
Updates the user profile information.
Use UserProfileChangeRequestBuilder
to construct the request.
Will dispatch a FirebaseUserEvent.UPDATE_PROFILE_COMPLETE
when this completes.
Parameters
request:UserProfileChangeRequest |
user:deleteUser:complete | Event |
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent.DELETE_USER_COMPLETE
user:getToken:complete | Event |
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent.GET_TOKEN_COMPLETE
Dispatched when a call to
getToken
has completed.
If successful data
will contain the valid token
user:linkWithCredential:complete | Event |
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent.LINK_WITH_CREDENTIAL_COMPLETE
user:reauthenticate:complete | Event |
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent.REAUTHENTICATE_COMPLETE
user:reload:complete | Event |
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent.RELOAD_COMPLETE
Dispatched when a call to
FirebaseUser.reload
has completed.
user:sendEmailVerification:complete | Event |
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent.SEND_EMAIL_VERIFICATION_COMPLETE
user:unlink:complete | Event |
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent.UNLINK_COMPLETE
user:updateEmail:complete | Event |
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent.UPDATE_EMAIL_COMPLETE
user:updatePassword:complete | Event |
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent.UPDATE_PASSWORD_COMPLETE
user:updateProfile:complete | Event |
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent
com.distriqt.extension.firebase.auth.events.FirebaseUserEvent.UPDATE_PROFILE_COMPLETE