Class AN_GoogleSignInAccount
Class that holds the basic account information of the signed in Google user.
Inheritance
Namespace: SA.Android.GMS.Auth
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public class AN_GoogleSignInAccount : AN_LinkedObject
Methods
GetDisplayName()
Returns the display name of the signed in user if you built your configuration starting from DEFAULT_SIGN_IN or with RequestProfile() configured; null otherwise.
Not guaranteed to be present for all users, even when configured.
Declaration
public string GetDisplayName()
Returns
Type | Description |
---|---|
System.String | The display name. |
GetEmail()
Returns the email address of the signed in user if RequestEmail()() was configured; null otherwise. Applications should not key users by email address since a Google account's email address can change. Use GetId() as a key instead.
Declaration
public string GetEmail()
Returns
Type | Description |
---|---|
System.String | The email. |
GetGivenName()
Returns the given name of the signed in user if you built your configuration starting from DEFAULT_SIGN_IN or with RequestProfile() configured; null otherwise.
Not guaranteed to be present for all users, even when configured.
Declaration
public string GetGivenName()
Returns
Type | Description |
---|---|
System.String | The display name. |
GetId()
Returns the unique ID for the Google account if you built your configuration starting from DEFAULT_SIGN_IN or with RequestId() configured; null otherwise.
This is the preferred unique key to use for a user record.
Important: Do not use this returned Google ID to communicate the currently signed in user to your backend server. Instead, send an ID token (requestIdToken(String)), which can be securely validated on the server; or send a server auth code (requestServerAuthCode(String)) which can be in turn exchanged for id token.
Declaration
public string GetId()
Returns
Type | Description |
---|---|
System.String | The identifier. |
GetIdToken()
Returns an ID token that you can send to your server and sometimes refresh token if RequestIdToken(String) was configured; null otherwise. ID token is a JSON Web Token signed by Google that can be used to identify a user to a backend.
Declaration
public string GetIdToken()
Returns
Type | Description |
---|---|
System.String |
GetPhotoUrl()
Returns the photo url of the signed in user if you built your configuration starting from DEFAULT_SIGN_IN or with RequestProfile() configured; null otherwise.
Not guaranteed to be present for all users, even when configured.
Declaration
public string GetPhotoUrl()
Returns
Type | Description |
---|---|
System.String |
GetServerAuthCode()
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(String, Boolean) is configured. null otherwise.
Declaration
public string GetServerAuthCode()
Returns
Type | Description |
---|---|
System.String |