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 committed May 13, 2021
1 parent b677fef commit 3f3034e
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 @@ -46,7 +46,7 @@ def dispatch(self, request, helper):
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 3f3034e

Please sign in to comment.