Closed pjkarels closed 2 years ago
You may be mistaking SDKs.
AuthenticationClient
is part of okta-auth-java
.
That being said, the calls are meant to happen on a background thread. Are you sure you're switching threads? Could you try something like this?
val scope = CoroutineScope(Dispatchers.IO)
scope.launch {
authenticationClient.authenticate(...)
}
@JayNewstrom, thank you - I was leaving out the Dispatcher.IO
arg. Adding it makes it work nicely.
I get the exception NetworkOnMainThreadException when attempting to call AuthenticationClient.authenticate() when using Kotlin Coroutines. Are there plans to support coroutines?