Package | com.myflashlab.air.extensions.gSignIn |
Class | public class GAccount |
Inheritance | GAccount Object |
Property | Defined 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 |
displayName | property |
displayName:String
[read-only] Returns the display name of the signed in user. Not guaranteed to be present for all users
public function get displayName():String
property |
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.
public function get email():String
familyName | property |
familyName:String
[read-only] Returns the family name of the signed in user. Not guaranteed to be present for all users
public function get familyName():String
givenName | property |
givenName:String
[read-only] Returns the given name of the signed in user. Not guaranteed to be present for all users
public function get givenName():String
id | property |
id:String
[read-only]
Returns the unique ID for the Google account if requestId
in GSignInOptions is set.
public function get id():String
idToken | property |
idToken:String
[read-only] Returns an ID token that you can send to your server if requestIdToken in GSignInOptions was configured; null otherwise.
public function get idToken():String
photoUrl | property |
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
public function get photoUrl():String
scopes | property |
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.
public function get scopes():Array
serverAuthCode | property |
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
public function get serverAuthCode():String