Packagecom.myflashlab.air.extensions.gSignIn
Classpublic class GAccount
InheritanceGAccount Inheritance Object

Class that holds the account information of the signed in Google user.



Public Properties
 PropertyDefined By
  displayName : String
[read-only] Returns the display name of the signed in user.
GAccount
  email : String
[read-only] Returns the email address of the signed in user if requestEmail property was configured; null otherwise.
GAccount
  familyName : String
[read-only] Returns the family name of the signed in user.
GAccount
  givenName : String
[read-only] Returns the given name of the signed in user.
GAccount
  id : String
[read-only] Returns the unique ID for the Google account if requestId in GSignInOptions is set.
GAccount
  idToken : String
[read-only] Returns an ID token that you can send to your server if requestIdToken in GSignInOptions was configured; null otherwise.
GAccount
  photoUrl : String
[read-only] Returns the photo url of the signed in user if the user has a profile picture.
GAccount
  scopes : Array
[read-only] Returns all scopes that have been authorized to your application in an Array of Strings.
GAccount
  serverAuthCode : String
[read-only] Returns a one-time server auth code to send to your web server which can be exchanged for access token and sometimes refresh token if requestServerAuthCode in GSignInOptions is configured; null otherwise
GAccount
Property Detail
displayNameproperty
displayName:String  [read-only]

Returns the display name of the signed in user. Not guaranteed to be present for all users


Implementation
    public function get displayName():String
emailproperty 
email:String  [read-only]

Returns the email address of the signed in user if requestEmail property was configured; null otherwise.

Applications should not key users by email address since a Google account's email address can change. Use id as a key instead.

Important: Do not use this returned email address to communicate the currently signed in user to your backend server. Instead, send an ID token (requestIdToken in GSignInOptions), which can be securely validated on the server; or send server auth code (requestServerAuthCode in GSignInOptions) which can be in turn exchanged for id token.


Implementation
    public function get email():String
familyNameproperty 
familyName:String  [read-only]

Returns the family name of the signed in user. Not guaranteed to be present for all users


Implementation
    public function get familyName():String
givenNameproperty 
givenName:String  [read-only]

Returns the given name of the signed in user. Not guaranteed to be present for all users


Implementation
    public function get givenName():String
idproperty 
id:String  [read-only]

Returns the unique ID for the Google account if requestId in GSignInOptions is set.


Implementation
    public function get id():String
idTokenproperty 
idToken:String  [read-only]

Returns an ID token that you can send to your server if requestIdToken in GSignInOptions was configured; null otherwise.


Implementation
    public function get idToken():String
photoUrlproperty 
photoUrl:String  [read-only]

Returns the photo url of the signed in user if the user has a profile picture. Not guaranteed to be present for all users


Implementation
    public function get photoUrl():String
scopesproperty 
scopes:Array  [read-only]

Returns all scopes that have been authorized to your application in an Array of Strings.

Notice1: We are not sure if this is a bug or its happening by design but on the iOS side, when you start your app after user had been signedin in former launches, this property does not included the previously requested scopes! and when you check for them using the GSignIn.hasPermissions method, it returns false! However, the good news is that in this case, when you call GSignIn.requestPermissions with the missing scopes, these permissions will be returned successfully with the REQUEST_PERMISSION_SUCCESS event and no google window would be opened. So the user experience will be just similar to the Android's side anyhow. When this happens, this property returns the scopes correctly.

Notice2: On Android, the default scopes are returned by this property but on the iOS side, it's empty when you have access to the default scopes only. on the iOS side, this property includes only the requested extra permissions.


Implementation
    public function get scopes():Array
serverAuthCodeproperty 
serverAuthCode:String  [read-only]

Returns a one-time server auth code to send to your web server which can be exchanged for access token and sometimes refresh token if requestServerAuthCode in GSignInOptions is configured; null otherwise


Implementation
    public function get serverAuthCode():String