authorize

fun authorize(lifecycleOwner: LifecycleOwner, callback: VKIDAuthCallback, params: VKIDAuthParams = VKIDAuthParams {})

Initiates the authorization process.

Parameters

lifecycleOwner

The LifecycleOwner in which the authorization process should be handled.

callback

VKIDAuthCallback to handle the result of the authorization process.

params

Optional VKIDAuthParams for the authentication process.

Example usage:

VKID.instance.authorize(
lifecycleOwner = MainActivity@this,
callback = vkAuthCallback,
params = VKIDAuthParams {
scopes = setOf("status", "email")
}
)

suspend fun authorize(callback: VKIDAuthCallback, params: VKIDAuthParams = VKIDAuthParams {})

Initiates the authorization process in a coroutine scope.

Parameters

callback

VKIDAuthCallback to handle the result of the authorization process.

params

Optional VKIDAuthParams for the authentication process.

Example usage:

VKID.instance.authorize(
callback = vkAuthCallback,
params = VKIDAuthParams {
scopes = setOf("status", "email")
}
)