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
fix(oauth): Send id_token of the authorized user instead of Guest #17266
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## develop #17266 +/- ##
===========================================
- Coverage 56.38% 54.98% -1.40%
===========================================
Files 760 760
Lines 68398 68400 +2
Branches 5901 5901
===========================================
- Hits 38564 37611 -953
- Misses 26123 27078 +955
Partials 3711 3711
Flags with carried forward coverage won't be shown. Click here to find out more. |
This only affects OAuth clients that use `id_token` obtained from `frappe.integrations.oauth2.get_token`. Doesn't affect OAuth clients that ignore id_token and explicitly use `frappe.integrations.oauth2.openid_profile` endpoint for getting user details. e.g. Frappe OAuth client. A simple way to replicate this is to setup Frappe-Frappe OAuth client-server pair and use `login_via_oauth2_id_token` instead of `login_via_oauth2` in `login_via_frappe`.
adityahase
force-pushed
the
fix-oauth-id-token
branch
from
June 21, 2022 16:20
286b979
to
23cad54
Compare
This only affects OAuth clients that use `id_token` obtained from `frappe.integrations.oauth2.get_token`. Doesn't affect OAuth clients that ignore id_token and explicitly use `frappe.integrations.oauth2.openid_profile` endpoint for getting user details. e.g. Frappe OAuth client. A simple way to replicate this is to setup Frappe-Frappe OAuth client-server pair and use `login_via_oauth2_id_token` instead of `login_via_oauth2` in `login_via_frappe`.
gavindsouza
approved these changes
Jun 22, 2022
mergify ded? 😢 |
@Mergifyio backport version-13-hotfix |
ankush
added a commit
that referenced
this pull request
Sep 1, 2022
…ckport #17266) (#18007) * test(oauth): Send id_token of the authorized user instead of Guest This only affects OAuth clients that use `id_token` obtained from `frappe.integrations.oauth2.get_token`. Doesn't affect OAuth clients that ignore id_token and explicitly use `frappe.integrations.oauth2.openid_profile` endpoint for getting user details. e.g. Frappe OAuth client. A simple way to replicate this is to setup Frappe-Frappe OAuth client-server pair and use `login_via_oauth2_id_token` instead of `login_via_oauth2` in `login_via_frappe`. (cherry picked from commit 23cad54) # Conflicts: # frappe/tests/test_oauth20.py * fix(oauth): Send id_token of the authorized user instead of Guest This only affects OAuth clients that use `id_token` obtained from `frappe.integrations.oauth2.get_token`. Doesn't affect OAuth clients that ignore id_token and explicitly use `frappe.integrations.oauth2.openid_profile` endpoint for getting user details. e.g. Frappe OAuth client. A simple way to replicate this is to setup Frappe-Frappe OAuth client-server pair and use `login_via_oauth2_id_token` instead of `login_via_oauth2` in `login_via_frappe`. (cherry picked from commit 93320ce) * chore: conflicts Co-authored-by: Aditya Hase <aditya@adityahase.com> Co-authored-by: Ankush Menat <ankush@frappe.io>
frappe-pr-bot
pushed a commit
that referenced
this pull request
Sep 6, 2022
# [13.41.0](v13.40.0...v13.41.0) (2022-09-06) ### Bug Fixes * comma looks like a decimal in report summary widget ([#18014](#18014)) ([#18016](#18016)) ([af2598e](af2598e)) * **Data Import:** make warnings translatable (backport [#17924](#17924)) ([#17930](#17930)) ([1eb7248](1eb7248)) * **oauth:** Send id_token of the authorized user instead of Guest (backport [#17266](#17266)) ([#18007](#18007)) ([415f1f1](415f1f1)) ### Features * add lang to safe globals ([f51780a](f51780a))
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This only affects OAuth clients that use
id_token
obtained fromfrappe.integrations.oauth2.get_token
.Doesn't affect OAuth clients that ignore id_token and explicitly use
frappe.integrations.oauth2.openid_profile
endpoint for getting user details. e.g. Frappe OAuth client.A simple way to replicate this is to setup Frappe-Frappe OAuth client-server pair and use
login_via_oauth2_id_token
instead oflogin_via_oauth2
inlogin_via_frappe
.Reference: https://github.com/frappe/frappe/runs/6988384120?check_suite_focus=true#step:14:1019 In case the test results get lost.
This came up while setting up OAuth for Sentry.
Before.mp4
After.mp4
But mere mortals probably don't have Sentry instances lying around. Replicating with frappe works too.
Frappe.-.Before.mp4
Frappe.-.After.mp4