-
Notifications
You must be signed in to change notification settings - Fork 21
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
Allow fetching user claims through the userinfo_endpoint
for upstream OAuth 2.0 providers
#3363
Conversation
1903904
to
4a62a23
Compare
c59ee5b
to
4a62a23
Compare
4a62a23
to
d4f4c95
Compare
crates/storage-pg/migrations/20241014145741_upstream_oauth_userinfo.sql
Outdated
Show resolved
Hide resolved
d4f4c95
to
9f3ac54
Compare
9f3ac54
to
7c73cf6
Compare
Could we unleash the CI please :) ? |
a4e6e78
to
63e680d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skimming through this, it looks alright, thanks a lot! I think we need to wait for #3521 to land, so that you can rebase on top of it
lazy_metadata.userinfo_endpoint().await?, | ||
response.access_token.as_str(), | ||
Some(verification_data), | ||
&id_token_map.ok_or(RouteError::MissingIDToken)?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I did not know we were checking that the userinfo returns the same sub & co as the id_token… we probably want to remove that, as we'd like to support non-OIDC providers as well…
I can do that in a later PR though
0de88fb
to
880c7b9
Compare
35ecaf6
to
1c167ac
Compare
1c167ac
to
5d5519f
Compare
crates/storage-pg/migrations/20241124145741_upstream_oauth_userinfo.sql
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! It just occurred to me that it's missing documentation about the new options here: https://element-hq.github.io/matrix-authentication-service/reference/configuration.html#upstream_oauth2
But I'm fine with doing this in another PR
Well done @MatMaul :) |
userinfo_endpoint
for upstream OAuth 2.0 providers
Untested for now so I am keeping it as a draft.