You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: use subject_source pattern for OAuth2 provider subject
Replace `use_external_id` boolean config with `subject_source` enum to
match the existing tokenizer pattern. The new config accepts:
- "id" (default): Use identity ID as OAuth2 subject
- "external_id": Use identity's external_id as OAuth2 subject
Returns an error when `subject_source` is set to "external_id" but the
identity's external_id is unset, ensuring predictable behavior and
making it easier to identify which ID was used.
This aligns the OAuth2 provider configuration with the session
tokenizer implementation for consistency across the codebase.
Closes#4528
Copy file name to clipboardExpand all lines: embedx/config.schema.json
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2286,11 +2286,12 @@
2286
2286
"default": false,
2287
2287
"description": "Override the return_to query parameter with the OAuth2 provider request URL when perfoming an OAuth2 login flow."
2288
2288
},
2289
-
"use_external_id": {
2290
-
"title": "Use external_id as subject",
2291
-
"type": "boolean",
2292
-
"default": false,
2293
-
"description": "If set, the external_id of the identity will be used as the subject in the OAuth2 login request. If no external_id is set, the identity ID will be used."
2289
+
"subject_source": {
2290
+
"title": "Subject source for OAuth2 login",
2291
+
"type": "string",
2292
+
"enum": ["id", "external_id"],
2293
+
"default": "id",
2294
+
"description": "Determines which identifier to use as the subject in OAuth2 login requests. Can be either 'id' (identity ID, default) or 'external_id' (identity's external ID). If 'external_id' is selected but not set on the identity, an error will be returned."
return"", errors.WithStack(herodot.ErrBadRequest.WithReasonf("The identity does not have an external ID set, but it is required for the OAuth2 provider subject."))
0 commit comments