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 Desktop: redirectPath is hardcoded to /redirect #63

Closed realdadfish closed 1 month ago

realdadfish commented 2 months ago

The redirect path is hardcoded to be /redirect in https://github.com/kalinjul/kotlin-multiplatform-oidc/blob/main/oidc-appsupport/src/jvmMain/kotlin/org/publicvalue/multiplatform/oidc/appsupport/webserver/Webserver.kt#L20, so regardless of what path (/ or anything else) one specifies, unless it's /redirect, the auth parameters are not grabbed from the incoming request.

realdadfish commented 2 months ago

Also, I figured that my browser (macOS, Chrome) shows me a 406 Not Acceptable when the redirect is requested, not the 200 OK that the code actually uses. I don't know where this stems from. I could however imagine that one renders a simple "Success, return to your application" page and eventually has a small JS timer to call window.close().

kalinjul commented 1 month ago

Thanks for your fix which is merged in 0.10.1 :)