-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
Support nonce and acr with OIDC + Tests #883
base: main
Are you sure you want to change the base?
Support nonce and acr with OIDC + Tests #883
Conversation
e78e2f3
to
8b90c90
Compare
Opening the PR for checking whether the tests work in the CI |
56706b3
to
1bf114a
Compare
3603767
to
bb6445b
Compare
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 @dsagal for your review! 🙏
I made the changes requested.
@@ -167,33 +224,43 @@ export class OIDCConfig { | |||
profile, | |||
})); | |||
|
|||
delete mreq.session.oidc; | |||
mreq.session.oidc = { |
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.
Is what I wrote good to you?
app/server/lib/OIDCConfig.ts
Outdated
res.redirect(targetUrl ?? '/'); | ||
} catch (err) { | ||
log.error(`OIDC callback failed: ${err.stack}`); | ||
// Delete the session data even if the login failed. | ||
if (Object.prototype.hasOwnProperty.call(err, 'response')) { | ||
log.error(`Response received: ${err.response?.body ?? err.response}`); |
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.
I realized that the error may be multiple things (especially the body may be a buffer).
I made some changes, with the hope it will be fine for you. If that's too tricky or you feel a bit uncomfortable, I may remove this log and reintroduce it a bit later or in a separate PR.
561dc45
to
15732bc
Compare
Context
Proposed solution
GRIST_OIDC_IDP_ENABLED_PROTECTIONS
variable who can contain comma-separated values with either:STATE
,NONCE
andPKCE
, and defaults toSTATE,PKCE
;GRIST_OIDC_IDP_ACR_VALUES
variable with space separated values;