kotlin-multiplatform-oidc icon indicating copy to clipboard operation
kotlin-multiplatform-oidc copied to clipboard

JVM AppSupport displays 406 after successfull authentication

Open glsthomaskeller opened this issue 1 year ago • 1 comments
trafficstars

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)

glsthomaskeller avatar Aug 12 '24 13:08 glsthomaskeller

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).

realdadfish avatar Aug 14 '24 07:08 realdadfish

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

uliluckas avatar Sep 26 '24 14:09 uliluckas