Skip to content

Commit

Permalink
refactor: always return a domain for OIDC
Browse files Browse the repository at this point in the history
`hd` is a Google Specific claim and is not present in other OIDC providers.
  • Loading branch information
jawabuu authored and max-wittig committed Oct 15, 2024
1 parent e1e4042 commit 8fdfa74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oidc/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def dispatch(self, request: HttpRequest, helper) -> Response: # type: ignore
if self.version is None:
domain = extract_domain(payload["email"])
else:
domain = payload.get("hd")
domain = payload.get("hd", extract_domain(payload["email"]))

if domain is None:
return helper.error(ERR_INVALID_DOMAIN % (domain,))
Expand Down

0 comments on commit 8fdfa74

Please sign in to comment.