signIn

open suspend fun signIn(): GoogleUser?

Opens Sign In with Google UI, and returns GoogleUser if sign-in was successful, otherwise, null By default all available accounts are listed to choose from

Return

returns GoogleUser or null(if sign-in was not successful)

See also

(filterByAuthorizedAccounts: Boolean)


open suspend fun signIn(filterByAuthorizedAccounts: Boolean, isAutoSelectEnabled: Boolean = true): GoogleUser?

Parameters

filterByAuthorizedAccounts

set to true so users can choose between available accounts to sign in. setting to false list any accounts that have previously been used to sign in to your app. Default value is false.

isAutoSelectEnabled

If true, the user will be automatically signed in without showing the account chooser when there is exactly one eligible account. If false, the account chooser will be shown even if only one account is available. Default value is true


abstract suspend fun signIn(filterByAuthorizedAccounts: Boolean = false, isAutoSelectEnabled: Boolean = true, scopes: List<String> = BASIC_AUTH_SCOPE): GoogleUser?

Parameters

filterByAuthorizedAccounts

set to true so users can choose between available accounts to sign in. setting to false list any accounts that have previously been used to sign in to your app. Default value is false.

isAutoSelectEnabled

If true, the user will be automatically signed in without showing the account chooser when there is exactly one eligible account. If false, the account chooser will be shown even if only one account is available. Default value is true

scopes

Custom scopes to retrieve more information. Default value listOf("email", "profile")