DeviceAuthorizationFlow
interface DeviceAuthorizationFlow
Implements the Device Authorization Grant flow.
Use start to obtain a DeviceAuthorizationFlowContext containing the user code and verification URI to display to the user, then poll resume until the user completes authorization or the session expires.
val flow = DeviceAuthorizationFlow(client)
val ctx = flow.start().getOrThrow()
println("Visit ${ctx.verificationUriComplete} and enter ${ctx.userCode}")
val tokenInfo = flow.resume(ctx).getOrThrow()Content copied to clipboard
Types
Functions
Link copied to clipboard
abstract suspend fun resume(flowContext: DeviceAuthorizationFlowContext): ERROR CLASS: Symbol not found for Result<ERROR CLASS: Symbol not found for TokenInfo>
Polls the token endpoint until the user authorizes or the session expires.