kalinjul / kotlin-multiplatform-oidc

Kotlin Multiplatform OpenIDConnect implementation for Android/iOS
https://kalinjul.github.io/kotlin-multiplatform-oidc/
Apache License 2.0
40 stars 15 forks source link

JVM AppSupport displays 406 after successfull authentication #65

Open ghost opened 1 month ago

ghost commented 1 month ago

When the JVM OAuth Flow is triggered on a Desktop application, it ends a successful authentication attempt with a 406 error in the browser that confuses users:

Bildschirmfoto 2024-08-12 um 15 34 36

Since the webserver is immediately shut down afterwards, a reload obviously does not help.

A better approach would be to display some kind of informational message to the user that he can close the browser window and return to his application or alternatively use one of the multiplatform webkit / webview implementations (like https://github.com/KevinnZou/compose-webview-multiplatform)

realdadfish commented 1 month ago

Eventually it would be cool if the flow could redirect the browser to a custom, configurable redirect URI anyways, something like myapp://my.package/auth-finished so that when the app installs a protocol handler in the system the browser prompts the user to switch back / open the application again (described more in detail here).

uliluckas commented 6 days ago

It would probably be enough, if the embedded web server could serve a configurable response to the redirect request.