-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added code_challenge for PKCE #56
base: main
Are you sure you want to change the base?
Conversation
I don’t know what “through broker” means. If you can give a full description of the issue with steps and request content, I might be able to help.
|
Hey @xgp I would love this to be merged, is it something that's on the team's radar? |
@@ -143,6 +163,7 @@ public static MagicLinkActionToken createActionToken( | |||
String scope, | |||
String nonce, | |||
String state, | |||
String codeChallenge, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xgp I've noticed the codeChallenge parameter is not passed in to the MagicLinkActionToken
constructor. If I pass it in and run it against my setup I get a different PKCE failure, Code mismatch
instead of challenge not present
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Feel free to take up this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Gryff. This now has your changes merged and the recent changes to main
. Trying to get a few more testers with different oidc libs before I merge it.
Is it possible that this branch does not works for me? I open the following URL to test: And I have the following client config: {
"clientId": "test",
"name": "",
"description": "",
"rootUrl": "https://www.keycloak.org/app/",
"adminUrl": "https://www.keycloak.org/app/",
"baseUrl": "https://www.keycloak.org/app/",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"redirectUris": [
"*"
],
"webOrigins": [
"*"
],
"notBefore": 0,
"bearerOnly": false,
"consentRequired": false,
"standardFlowEnabled": true,
"implicitFlowEnabled": false,
"directAccessGrantsEnabled": true,
"serviceAccountsEnabled": false,
"publicClient": true,
"frontchannelLogout": true,
"protocol": "openid-connect",
"attributes": {
"realm_client": "false",
"oidc.ciba.grant.enabled": "false",
"backchannel.logout.session.required": "true",
"post.logout.redirect.uris": "*",
"display.on.consent.screen": "false",
"oauth2.device.authorization.grant.enabled": "false",
"backchannel.logout.revoke.offline.tokens": "false"
},
"authenticationFlowBindingOverrides": {},
"fullScopeAllowed": true,
"nodeReRegistrationTimeout": -1,
"defaultClientScopes": [
"web-origins",
"acr",
"profile",
"roles",
"basic",
"email"
],
"optionalClientScopes": [
"address",
"phone",
"offline_access",
"organization",
"microprofile-jwt"
],
"access": {
"view": true,
"configure": true,
"manage": true
}
} And after clicking on the link from the e-mail, I'm redirected to this URL:
And the |
@vilmosnagy The query params aren't missing, but seem to be added to the URL over and over:
This has happened to me when I've set keycloak up incorrectly, though I don't know which part of keycloak is responsible. I have just tried a keycloak setup with the keycloak test site, with this magic link PR and I get this URL, which seems correct:
Looks like you haven't added |
@Gryff hm, you seems to be right about it adding multiple times; The only valid redirect URI I've added in the client config was I think you cannot misconfigure it (how did you?), otherwise keycloak would have complained of the wrong redirect URI at the very beginning of the login process. |
solves #8