fix: Check wrong OpenID's spec email claims

This commit is contained in:
lapphan 2019-07-25 23:10:24 +07:00 committed by GitHub
parent 2be45d71ea
commit af35e82b1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,7 +142,7 @@ def get_info_via_oauth(provider, code, decoder=None, id_token=False):
api_endpoint_args = oauth2_providers[provider].get("api_endpoint_args")
info = session.get(api_endpoint, params=api_endpoint_args).json()
if not (info.get("verified_email") or info.get("verified")):
if not (info.get("email_verified") or info.get("email")):
frappe.throw(_("Email not verified with {0}").format(provider.title()))
return info