Authenticate using the Authorization Code Flow
mainThe library uses CodeAuthFlow to implement the Authorization Code Grant Flow. You must obtain an authFlowFactory (platform-specific implementation) via Dependency Injection.
To start the login process (which opens the system browser) and retrieve tokens:
- Call
authFlowFactory.createAuthFlow(client). - Call
flow.startLogin(). - Call
flow.continueLogin()to get the resulting tokens.
val flow = authFlowFactory.createAuthFlow(client)
flow.startLogin()
val tokens = flow.continueLogin()