-
-
Notifications
You must be signed in to change notification settings - Fork 54
FB4D Reference IFirebaseUser
This interface provides only getter functions that are used to retrieve details of the user profile and the access token.
To identify a user, Firebase defines the UID as a random string of 28 characters of the following alphabet:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
Check if an email address exists:
function IsEMailAvailable: boolean;
Check whether the email is for an existing account:
function IsEMailRegistered: TThreeStateBoolean;
Returns true if the user's email is verified:
function IsEMailVerified: TThreeStateBoolean;
Retrieve the email address of the user:
function EMail: string;
Normally, the user's display name allows the user to choose freely and is used for display within an application (for example, a chat). Note that Firebase does not ensure that there is only one user with the same name for this field.
function IsDisplayNameAvailable: boolean;
function DisplayName: string;
To identify the user via a photo or avatar the PhotoURL can be used:
function IsPhotoURLAvailable: boolean;
function PhotoURL: string;
Returns true if the user account was disabled:
function IsDisabled: TThreeStateBoolean;
Returns true if the user new created:
function IsNew#User: boolean;
Is the timestamp of the last login available?
function IsLastLoginAtAvailable: boolean;
Timestamp of the last login:
function LastLoginAt(TimeZone: TTimeZone = tzLocalTime): TDateTime;
When was the user registered in Firebase?
function IsCreatedAtAvailable: boolean;
function CreatedAt(TimeZone: TTimeZone = tzLocalTime): TDateTime;
Return the access token as a string:
function Token: string;
When will the access token be expired:
function ExpiresAt: TDateTime;
In order to refresh the access token without to re-sign-in the refresh-token needs to be sent to the Firebase Authentication Service. This will be done usually automatically within the FB4D. Use the following function to retrieve the update token:
function RefreshToken: string;
The following 3 functions are available only when the conditional compiling switch TOKENJWT is defined. For more details see the next chapter ITokenJWT
function TokenJWT: ITokenJWT;
This function returns a list with all claim field names in the JWTToken. In addition to the standard fields of the Firebase Authorization Service, it is possible to add also project-specific fields on server side by writing a Firebase Function that extends the JWTToken. This can be used for example to integrate an own access level into the token.
function ClaimFieldNames: TStrings;
This function returns the content of a claim-field as a JSON value.
function ClaimField(const FieldName: string): TJSONValue;
Have you discovered an error? Or is something unclear? Please let us know in the discussion forum.
Schneider Infosystems Ltd. CH-6340 Baar, Switzerland, www.schneider-infosys.ch
Introduction into FB4D
Getting Started
Fundamental Principles
Project Settings
GUI Pattern Self-Registration
RT-DB Sample Applications
Firestore Chat Sample Applications
PhotoBox demonstrates Firestore, Storage, VisionML
Interface Reference
Configuration and Class Factory
Helper Classes
Authentication