Skip to content

Add support for client-side OIDC redirect by UUID#9790

Merged
mitchellhenke merged 1 commit intomainfrom
mitchellhenke/more-oidc-client-side-config
Dec 18, 2023
Merged

Add support for client-side OIDC redirect by UUID#9790
mitchellhenke merged 1 commit intomainfrom
mitchellhenke/more-oidc-client-side-config

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
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.

2 participants