Which packages do you think might be impacted by the bug ?
[x] solid-client-authn-browser
[ ] solid-client-authn-node
[x] solid-client-authn-core
[x] oidc-client-ext
[x] (could be PodBrowser?)
Bug description
I am trying to make local PodBrowser work with Keycloak, which is an OIDC compliant AS (but not Solid compliant yet). The library falls back to DCR which is correct; I noticed that two clients are registered with Keycloak, one for the root URL (https://localhost:3001/), another one for the login screen URL (https://localhost:3001/login/). First, the former one is used in a call to Keycloak's authorization endpoint. Next, the latter one is used to call Token endpoint to perform code-to-token exchange. This is not supported by Keycloak (and I doubt it is by any other software), which results in a 400 Bad Request with error=invalid_grant and error_description="Auth error".
This occurs with fairly high probability; however, in some rare cases the correct client ID is used in both calls, and login succeeds.
@justinwb @jamiefiedler
HAR logs for the two respective cases: bug.zip
Stack trace: bug.txt
This issue is Firefox-specific and is not observed in Chrome. I've also accidentally discovered that setting a breakpoint in Firefox debugger on ClientRegistrar#getClient() somehow prevents the second DCR call, thus resulting in a successful login.
To Reproduce
Get Keycloak development branch with DPoP support (see below)
Open PodBrowser and point it to your realm, like e.g. http://localhost:8080/auth/realms/solid
Expected result
Successful login and display of pod contents
Actual result
Error popup saying there was an error while getting tokens
Testing was performed against the development branch of Keycloak containing Solid-OIDC related improvements. The branch hasn't been published yet; please let me know if you'd like me to provide you with an image or a live instance.
Impacted package
Which packages do you think might be impacted by the bug ?
Bug description
I am trying to make local PodBrowser work with Keycloak, which is an OIDC compliant AS (but not Solid compliant yet). The library falls back to DCR which is correct; I noticed that two clients are registered with Keycloak, one for the root URL (https://localhost:3001/), another one for the login screen URL (https://localhost:3001/login/). First, the former one is used in a call to Keycloak's authorization endpoint. Next, the latter one is used to call Token endpoint to perform code-to-token exchange. This is not supported by Keycloak (and I doubt it is by any other software), which results in a
400 Bad Request
witherror=invalid_grant
anderror_description="Auth error"
.This occurs with fairly high probability; however, in some rare cases the correct client ID is used in both calls, and login succeeds.
@justinwb @jamiefiedler
HAR logs for the two respective cases: bug.zip Stack trace: bug.txt
https://user-images.githubusercontent.com/13701445/142276448-4cfb543f-17c6-433d-b967-aec78848f872.mp4
This issue is Firefox-specific and is not observed in Chrome. I've also accidentally discovered that setting a breakpoint in Firefox debugger on
ClientRegistrar#getClient()
somehow prevents the second DCR call, thus resulting in a successful login.To Reproduce
http://localhost:8080/auth/realms/solid
Expected result
Successful login and display of pod contents
Actual result
Error popup saying there was an error while getting tokens
Environment
Additional information
Testing was performed against the development branch of Keycloak containing Solid-OIDC related improvements. The branch hasn't been published yet; please let me know if you'd like me to provide you with an image or a live instance.