exchange Code For Session
abstract suspend fun exchangeCodeForSession(code: String, saveSession: Boolean = true): UserSession(source)
Exchanges a code for a session. Used when using the FlowType.PKCE flow
Parameters
code
The code to exchange
save Session
Whether to save the session in storage
Throws
Rest Exception
or one of its subclasses if receiving an error response. If the error response contains a error code, an AuthRestException will be thrown which can be used to easier identify the problem.
Http Request Timeout Exception
if the request timed out
Http Request Exception
on network related issues