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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Google] Add switch to strip domain from username #748

Merged
merged 6 commits into from
Sep 2, 2024

Conversation

0mar
Copy link
Contributor

@0mar 0mar commented Jul 26, 2024

Taking a stab at #733.

I added a switch to the Google OAuthenticator to explicitly indicate whether domains should be stripped, which by default is set to False. If set to True, domain names will be stripped, and if in addition there are multiple domains specified, a warning will be produced. Perhaps this should be an error instead?

Closes #733

@manics
Copy link
Member

manics commented Jul 26, 2024

Thanks for working on this. At the moment it's going to silently break most existing users who only have a single domain. Even if we highlight it in a changelog it's likely to be missed.

I can think of two options:

  • never strip the domain if there are multiple domains, so this new parameter only affects single domains and defaults to the current behaviour.
  • use a dynamic default (you can use a traitlets default method to set this) so if it's not set by the admin the behaviour is unchanged from the current.

@0mar
Copy link
Contributor Author

0mar commented Jul 26, 2024

Thanks for the feedback. The second option sounds like it covers the most use cases, so I've gone with that one

Copy link
Member

@GeorgianaElena GeorgianaElena left a comment

Choose a reason for hiding this comment

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

This looks good to me @0mar! Thank you for fixing it.

@GeorgianaElena GeorgianaElena merged commit d2aac2d into jupyterhub:main Sep 2, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Google] Decouple hosted_domain from domain stripping usernames
4 participants