-
Notifications
You must be signed in to change notification settings - Fork 114
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for client-side OIDC redirect by UUID #9790
Add support for client-side OIDC redirect by UUID #9790
Conversation
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.
LGTM
server_side_uuid = IdentityConfig.store.openid_connect_redirect_server_side_uuids.include?(user_uuid) | ||
client_side_uuid = IdentityConfig.store.openid_connect_redirect_client_side_uuids.include?(user_uuid) | ||
client_side_js_uuid = IdentityConfig.store.openid_connect_redirect_client_side_js_uuids.include?(user_uuid) | ||
|
||
default = IdentityConfig.store.openid_connect_redirect |
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.
it's potentially more error-prone in some ways, but if we had one config that was a hash/dictionary, we could just do one lookup and simplify a lot of this code?
config = {
"uuid-a" => "server_side",
"uuid-b" => "client_side",
# etc....
}.transform_values(&:to_sym)
case config.fetch(current_user.uuid, IdentityConfig.store.openid_connect_redirect)
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 like that better
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 opted to switch the values to strings though
ab83790
to
c460a5f
Compare
changelog: Internal, OpenID Connect, Add support for client-side OIDC redirect Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
c460a5f
to
2d54c18
Compare
馃洜 Summary of changes
This adds another layer of configuration to help us debug and test changes around client-side redirect