# GoogleSignInOptions

# GoogleSignInOptions


```
class GoogleSignInOptions : Parcelable, Api.ApiOptions.Optional
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> Use [Credential Manager](https://developer.android.com/training/sign-in/credential-manager) for authentication or [Google Identity Services](https://developers.google.com/identity/sign-in/android/authorize-access) for authorization.

`GoogleSignInOptions` contains options used to configure the `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/Auth#GOOGLE_SIGN_IN_API()`.

## Summary

| ### Nested types |
|---|
| `class https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions.Builder` **This class is deprecated.** Use [Credential Manager](https://developer.android.com/training/sign-in/credential-manager) for authentication or [Google Identity Services](https://developers.google.com/identity/sign-in/android/authorize-access) for authorization. <br /> |

| ### Constants |
|---|---|
| `const https://developer.android.com/reference/android/os/Parcelable.Creator.html<https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions!>!` | `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions#CREATOR()` |
| `const https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions!` | `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions#DEFAULT_GAMES_SIGN_IN()` Default and recommended configuration for Games Sign In. |
| `const https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions!` | `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions#DEFAULT_SIGN_IN()` Default configuration for Google Sign In. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions#equals(java.lang.Object)(obj: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html<https://developers.google.com/android/reference/kotlin/com/google/android/gms/common/api/Scope!>!` | `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions#getScopeArray()()` Gets an array of all the requested scopes. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions#hashCode()()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions#writeToParcel(android.os.Parcel,int)(out: https://developer.android.com/reference/android/os/Parcel.html!, flags: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` |

| ### Inherited Constants |
|---|
| From [com.google.android.gms.common.api.Api.ApiOptions](https://developers.google.com/android/reference/kotlin/com/google/android/gms/common/api/Api.ApiOptions) |---|---| | `const https://developers.google.com/android/reference/kotlin/com/google/android/gms/common/api/Api.ApiOptions.NoOptions!` | `https://developers.google.com/android/reference/kotlin/com/google/android/gms/common/api/Api.ApiOptions#NO_OPTIONS()` Static instance of `NoOptions`. | |
| From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) |---|---| | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR() = 1` | | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE() = 1` | |

| ### Inherited functions |
|---|
| From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) |---|---| | `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/os/Parcelable.html#describeContents()()` | |

## Constants

### CREATOR

```
const val CREATOR: Parcelable.Creator<GoogleSignInOptions!>!
```

### DEFAULT_GAMES_SIGN_IN

```
const val DEFAULT_GAMES_SIGN_IN: GoogleSignInOptions!
```

Default and recommended configuration for Games Sign In.

- If your app has a server, you can build a configuration via `new
  GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN)` and further configure requestServerAuthCode.
- If you want to customize Games sign-in options, you can build a configuration via `
  new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN)` and further configure com.google.android.gms.games.Games.GamesOptions via `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions.Builder#addExtension(com.google.android.gms.auth.api.signin.GoogleSignInOptionsExtension)`.

To maximize chance of auto-sign-in, do NOT use `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions.Builder#requestScopes(com.google.android.gms.common.api.Scope,com.google.android.gms.common.api.Scope...)` to request additional scopes and do NOT use `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInOptions.Builder#requestIdToken(java.lang.String)` to request user's real Google identity assertion.

### DEFAULT_SIGN_IN

```
const val DEFAULT_SIGN_IN: GoogleSignInOptions!
```

Default configuration for Google Sign In. You can get a stable user ID and basic profile info back via `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInAccount#getId()` after you trigger sign in from either `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInApi#silentSignIn(com.google.android.gms.common.api.GoogleApiClient)` or `https://developers.google.com/android/reference/kotlin/com/google/android/gms/auth/api/signin/GoogleSignInApi#getSignInIntent(com.google.android.gms.common.api.GoogleApiClient)`. If you require more information for the sign in result, please build a configuration via `new
GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)`}.

## Public functions

### equals

```
fun equals(obj: Any?): Boolean
```

### getScopeArray

```
fun getScopeArray(): Array<Scope!>!
```

Gets an array of all the requested scopes. If you use DEFAULT_SIGN_IN, this array will also include those scopes set by default in DEFAULT_SIGN_IN.

A usage of this method could be set the scopes for the contextual SignInButton. E.g., `
signInButton.setScopes(googleSignInOptions.getScopeArray()) `

### hashCode

```
fun hashCode(): Int
```

### writeToParcel

```
fun writeToParcel(out: Parcel!, flags: Int): Unit
```