I'm not sure about Okta, but I've used Amazon Cognito which uses the Oauth2 standard, in combination with a compose for web frontend. But the problem is independent of using Compose for Web or some other framework for the user interface. I used ktor to access the various http endpoints needed to get access tokens, refresh tokens, etc. I couldn't find a Kotlin implementation of an Oauth2 client that could be used in the browser (i.e. not dependent on JVM libraries), so I guess I sort of wrote my own minimum implementation to do what I needed.