From efccf432074e1acf3214ab6cdccbb034877bd4a9 Mon Sep 17 00:00:00 2001 From: jawabuu <49921621+jawabuu@users.noreply.github.com> Date: Sat, 24 Apr 2021 15:25:52 +0300 Subject: [PATCH] Always return a domain for OIDC `hd` is a Google Specific claim and is not present in other OIDC providers. --- oidc/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oidc/views.py b/oidc/views.py index 68491c5..6d040c2 100644 --- a/oidc/views.py +++ b/oidc/views.py @@ -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,))