OneTapBottomSheet
Composable function to display a bottom sheet for VKID One Tap authentication with multibranding.
Parameters
Modifier for this composable.
The state of the bottom sheet. To control sheet create state instance with rememberOneTapBottomSheetState and pass it here.
The name of the service for authentication. Will be displayed as title of sheet.
The OneTapScenario under which the authentication is being performed. It reflects on the texts of the button and sheet.
Automatically hide the sheet on successful authentication.
Callback function invoked on successful authentication with an OneTapOAuth and an AccessToken. The first parameter is the OAuth which was used for authorization or null if the main flow with OneTap was used. The second parameter is the access token to be used for working with VK API.
A callback to be invoked upon successful first step of auth - receiving auth code which can later be exchanged to access token. isCompletion is true if onAuth won't be called. This will happen if you passed auth parameters and implement their validation yourself. In that case we can't exchange auth code for access token and you should do this yourself.
Callback function invoked on authentication failure with an OneTapOAuth and a VKIDAuthFail object. The first parameter is the OAuth which was used for authorization or null if the main flow with OneTap was used. The second parameter is the error which happened during authorization.
The OneTapBottomSheetStyle of the bottom sheet. Default is OneTapBottomSheetStyle.Light
Optional params to be passed to auth. See VKIDAuthUiParams.Builder for more info.
Whether to fetch user. Defaults to true. In case this parameter is set to false the user data won't be fetched and user will have to confirm authorization on click. Note: this parameter doesn't support changes in runtime. Note: This parameter will hide "change account" button because in this case OneTap will have the same behaviour.
Composable function to display a bottom sheet for VKID One Tap authentication with multibranding.
Parameters
Modifier for this composable.
The state of the bottom sheet. To control sheet create state instance with rememberOneTapBottomSheetState and pass it here.
The name of the service for authentication. Will be displayed as title of sheet.
The OneTapScenario under which the authentication is being performed. It reflects on the texts of the button and sheet.
Automatically hide the sheet on successful authentication.
Callback function invoked on successful authentication with an OneTapOAuth and an AccessToken. The first parameter is the OAuth which was used for authorization or null if the main flow with OneTap was used. The second parameter is the access token to be used for working with VK API.
A callback to be invoked upon successful first step of auth - receiving auth code which can later be exchanged to access token. isCompletion is true if onAuth won't be called. This will happen if you passed auth parameters and implement their validation yourself. In that case we can't exchange auth code for access token and you should do this yourself.
Callback function invoked on authentication failure with an OneTapOAuth and a VKIDAuthFail object. The first parameter is the OAuth which was used for authorization or null if the main flow with OneTap was used. The second parameter is the error which happened during authorization.
The OneTapBottomSheetStyle of the bottom sheet. Default is OneTapBottomSheetStyle.Light
Optional params to be passed to auth. See VKIDAuthUiParams.Builder for more info.
Whether to fetch user. Defaults to true. In case this parameter is set to false the user data won't be fetched and user will have to confirm authorization on click. Note: this parameter doesn't support changes in runtime. Note: This parameter will hide "change account" button because in this case OneTap will have the same behaviour.
Delay in millis after which sheet will be automatically shown. Examples:
null: not shown automatically
0: shown automatically immediately
1000: show automatically after 1 second