Skip to content
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

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

mitchellhenke
Copy link
Contributor

馃洜 Summary of changes

This adds another layer of configuration to help us debug and test changes around client-side redirect

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 194 to 198
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
Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that better

Copy link
Contributor Author

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

@mitchellhenke mitchellhenke force-pushed the mitchellhenke/more-oidc-client-side-config branch from ab83790 to c460a5f Compare December 18, 2023 21:57
changelog: Internal, OpenID Connect, Add support for client-side OIDC redirect

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
@mitchellhenke mitchellhenke force-pushed the mitchellhenke/more-oidc-client-side-config branch from c460a5f to 2d54c18 Compare December 18, 2023 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants