java.lang.Object | |
↳ | com.neomades.googlesignin.GoogleSignInAccount |
Class that holds the basic account information of the signed in Google user.
Available only for Android
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getDisplayName()
Returns the display name of the signed in user; Can be
null . | ||||||||||
String |
getEmail()
Returns the email address of the signed in user if
requestEmail() was configured;
null otherwise. | ||||||||||
String |
getFamilyName()
Returns the family name of the signed in user if you built your
configuration; Can be
null . | ||||||||||
String |
getGivenName()
Returns the given name of the signed in user; Can be
null . | ||||||||||
String |
getId()
Returns the unique ID for the Google account; Can be
null . | ||||||||||
String |
getIdToken()
Returns an ID token that you can send to your server if
requestIdToken(String) was configured;
null otherwise. | ||||||||||
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) is configured;
null
otherwise. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns the display name of the signed in user; Can be null
. Not
guaranteed to be present for all users, even when configured.
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.
Returns the family name of the signed in user if you built your
configuration; Can be null
. Not guaranteed to be present for all
users, even when configured.
Returns the given name of the signed in user; Can be null
. Not
guaranteed to be present for all users, even when configured.
Returns the unique ID for the Google account; Can be null
. This
is the preferred unique key to use for a user record.
Returns an ID token that you can send to your server 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.
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) is configured; null
otherwise.