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

fail if external oauth service lacks required oauth_redirect_uri #4555

Merged
merged 2 commits into from Sep 13, 2023

Conversation

minrk
Copy link
Member

@minrk minrk commented Sep 6, 2023

and log service creation with oauth enabled/disabled

closes #4551

and log service creation with oauth enabled/disabled
jupyterhub/services/service.py Outdated Show resolved Hide resolved
jupyterhub/services/service.py Outdated Show resolved Hide resolved
jupyterhub/app.py Show resolved Hide resolved
@@ -2501,6 +2501,11 @@ def service_from_orm(
if orm_service.oauth_client is not None:
service.oauth_client_id = orm_service.oauth_client.identifier
service.oauth_redirect_uri = orm_service.oauth_client.redirect_uri
oauth_msg = f"with ouath_client_id={orm_service.oauth_client.identifier}"
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

- avoid empty values
- replace single check for redirect_uri with broader _oauth_specified
@yuvipanda yuvipanda merged commit f4426ae into jupyterhub:main Sep 13, 2023
18 checks passed
@yuvipanda
Copy link
Contributor

Just tested, works ok! Thanks @minrk!

@minrk minrk deleted the oauth-validate branch September 13, 2023 07:01
@minrk
Copy link
Member Author

minrk commented Feb 5, 2024

@meeseeksdev backport to 4.x

Copy link

lumberbot-app bot commented Feb 5, 2024

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 4.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 f4426ae0df4bff35bdb809a1c447d6707b979cc8
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #4555: fail if external oauth service lacks required oauth_redirect_uri'
  1. Push to a named branch:
git push YOURFORK 4.x:auto-backport-of-pr-4555-on-4.x
  1. Create a PR against branch 4.x, I would have named this PR:

"Backport PR #4555 on branch 4.x (fail if external oauth service lacks required oauth_redirect_uri)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

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.

"Invalid client_id" error message when real problem is that oauth_redirect_uri is missing
3 participants