-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add user_profile_method to upstream SSO provider #3363
base: main
Are you sure you want to change the base?
Conversation
1903904
to
4a62a23
Compare
|
||
let env = { | ||
let mut env = environment(); | ||
env.add_global("user", minijinja::Value::from_serialize(&id_token)); | ||
env.add_global("user", userinfo); |
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.
Just thinking out loud at this point, but it would be nice to have both the userinfo and the idtoken claims in the environment.
I don't know what the right config is to tell whether to fetch userinfo or not for example, but I would set userinfo_claims
in the template environment if we fetched it, id_token_claims
if we have an id_token
and user
being somehow a merge of the two?
One stretch goal of this would be for this to work with non-OIDC OAuth 2.0 providers, like GitHub, so we'd need to remove the id_token requirement at some point as well
c59ee5b
to
4a62a23
Compare
4a62a23
to
d4f4c95
Compare
ADD COLUMN "userinfo_endpoint_override" TEXT; | ||
|
||
ALTER TABLE "upstream_oauth_authorization_sessions" | ||
ADD COLUMN "userinfo" TEXT; |
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.
ADD COLUMN "userinfo" TEXT; | |
ADD COLUMN "userinfo" JSONB; |
d4f4c95
to
9f3ac54
Compare
Untested for now so I am keeping it as a draft.