-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: faster OIDC front/back-channel logout #3937
base: master
Are you sure you want to change the base?
Conversation
3a5ad64
to
c0b6da1
Compare
c0b6da1
to
aa1ee32
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.
Looks very good already!
(c.frontchannel_logout_uri IS NOT NULL AND c.frontchannel_logout_uri != '') | ||
OR c.backchannel_logout_uri != '' | ||
)`, | ||
cols.QuotedString(p.Connection(ctx).Dialect), |
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.
Nice, getting rid of select *
|
||
q = fmt.Sprintf(` | ||
SELECT %s FROM %s c | ||
WHERE id IN ( |
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 think WHERE EXISTS
would be more performant here as the DB doesn't need to materialize the full sub query result.
p.NetworkID(ctx), | ||
).All(&cs); err != nil { | ||
return nil, sqlcon.HandleError(err) | ||
for _, c := range cs { |
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.
Avoid repeated allocations here.
for _, c := range cs { | |
withFrontChannelURL, withBackChannelURL = make([]client.Client, 0, len(cs)), make([]client.Client, 0, len(cs)) | |
for _, c := range cs { |
Closes https://github.com/ory-corp/cloud/issues/7053