OAuthListWidget

fun OAuthListWidget(modifier: Modifier = Modifier, style: OAuthListWidgetStyle = OAuthListWidgetStyle.Dark(), onAuth: (oAuth: OAuth, accessToken: AccessToken) -> Unit, onAuthCode: (data: AuthCodeData, isCompletion: Boolean) -> Unit = { _, _ -> }, onFail: (oAuth: OAuth, fail: VKIDAuthFail) -> Unit, oAuths: Set<OAuth> = OAuth.entries.toSet(), authParams: VKIDAuthUiParams = VKIDAuthUiParams {})

Constructs a multibranding widget that supports auth with multiple OAuths.

Since

1.0.0

Parameters

modifier

Layout configuration for the widget.

style

Styling widget configuration.

onAuth

A callback to be invoked upon a successful auth.

onAuthCode

A callback to be invoked upon successful first step of auth - receiving auth code which can later be exchanged to access token.

onFail

A callback to be invoked upon an error during auth.

oAuths

A set of OAuths the should be displayed to the user.

authParams

Optional params to be passed to auth. See VKIDAuthUiParams.Builder for more info.


fun OAuthListWidget(modifier: Modifier = Modifier, style: OAuthListWidgetStyle = OAuthListWidgetStyle.Dark(), onAuth: (oAuth: OAuth, accessToken: AccessToken) -> Unit, onAuthCode: (data: AuthCodeData, isCompletion: Boolean) -> Unit = { _, _ -> }, onFail: (oAuth: OAuth, fail: VKIDAuthFail) -> Unit, oAuths: Set<OAuth> = OAuth.entries.toSet(), authParams: VKIDAuthUiParams = VKIDAuthUiParams {}, subscribeToGroupId: String, onSuccessSubscribingToGroup: () -> Unit, onFailSubscribingToGroup: (VKIDGroupSubscriptionFail) -> Unit = {}, groupSubscriptionSnackbarHostState: SnackbarHostState, groupSubscriptionStyle: GroupSubscriptionStyle = GroupSubscriptionStyle.Light())

Constructs a multibranding widget that supports auth with multiple OAuths.

This version integrates Group Subscription flow. The flow will be shown right after successful auth. NOTE: The "groups" scope will be added automatically to the set of requested scopes.

Since

2.5.0

Parameters

modifier

Layout configuration for the widget.

style

Styling widget configuration.

onAuth

A callback to be invoked upon a successful auth.

onAuthCode

A callback to be invoked upon successful first step of auth - receiving auth code which can later be exchanged to access token.

onFail

A callback to be invoked upon an error during auth.

oAuths

A set of OAuths the should be displayed to the user.

authParams

Optional params to be passed to auth. See VKIDAuthUiParams.Builder for more info.

subscribeToGroupId

The id of the group the user will be subscribed to.

onSuccessSubscribingToGroup

Will be called upon successful subscription.

onFailSubscribingToGroup

Will be called upon any unsuccessful flow completion along with an description of the specific encountered error.

groupSubscriptionSnackbarHostState

The host state for snackbars. Use along with GroupSubscriptionSnackbarHost and pass the same state as there.

groupSubscriptionStyle

The widget style, can change appearance.