kotlin-multiplatform-oidc
kotlin-multiplatform-oidc copied to clipboard
JVM AppSupport displays 406 after successfull authentication
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:
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)
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).
It would probably be enough, if the embedded web server could serve a configurable response to the redirect request.