java.lang.Object | |
↳ | com.neomades.googlesignin.GoogleSignInOptionsBuilder |
Builder for GoogleSignInOptions
.
Available only for Android
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
GoogleSignInOptionsBuilder()
Default Builder for
GoogleSignInOptions which starts with default
configuration for Google Sign In. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
final GoogleSignInOptions |
build()
Builds the
GoogleSignInOptions object. | ||||||||||
final GoogleSignInOptionsBuilder |
requestEmail()
Specifies that email info is requested by your application.
| ||||||||||
final GoogleSignInOptionsBuilder |
requestIdToken(String serverClientId)
Specifies that an ID token for authenticated users is requested.
| ||||||||||
GoogleSignInOptionsBuilder |
requestServerAuthCode(String serverClientId)
Specifies that offline access is requested.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Default Builder for GoogleSignInOptions
which starts with default
configuration for Google Sign In. You can get a stable user ID and basic
profile info back via getId() after you trigger sign in from
signIn(GoogleSignInCompletionListener)
.
Builds the GoogleSignInOptions
object.
GoogleSignInOptions
instance
Specifies that email info is requested by your application. Note that we don't recommend keying user by email address since email address might change. Keying user by ID is the preferable approach.
Specifies that an ID token for authenticated users is requested. Requesting
an ID token requires that the server client ID be specified.
To obtain the server client ID, look at
https://developers.google.com/identity/sign-in/android/start-integrating
and look how to get your backend server's OAuth 2.0 client ID.
serverClientId | the client ID of the server that will verify the integrity of the token. |
---|
Specifies that offline access is requested. Requesting offline access
requires that the server client ID be specified.
You don't need to use requestIdToken(String)
when you use this
option. When your server exchanges the code for tokens, an ID token will be
returned together (as long as you use requestEmail()
along with your
configuration).
The first time you retrieve a code, a refresh_token
will be
granted automatically. Subsequent requests will only return codes that can be
exchanged for access token.
serverClientId | The client ID of the server that will need the auth code. |
---|