From d21e4172b5d4a269244bae30ffd16bff9d2a3c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 13 Nov 2020 10:04:33 +0100 Subject: [PATCH] auth-backend: change messaging around missing email (#3287) --- plugins/auth-backend/src/providers/auth0/provider.ts | 2 +- plugins/auth-backend/src/providers/oauth2/provider.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/auth-backend/src/providers/auth0/provider.ts b/plugins/auth-backend/src/providers/auth0/provider.ts index 668ab17ee1..f851fb1eb5 100644 --- a/plugins/auth-backend/src/providers/auth0/provider.ts +++ b/plugins/auth-backend/src/providers/auth0/provider.ts @@ -139,7 +139,7 @@ export class Auth0AuthProvider implements OAuthHandlers { const { profile } = response; if (!profile.email) { - throw new Error('Profile does not contain a profile'); + throw new Error('Profile does not contain an email'); } const id = profile.email.split('@')[0]; diff --git a/plugins/auth-backend/src/providers/oauth2/provider.ts b/plugins/auth-backend/src/providers/oauth2/provider.ts index a657ea2195..6342d556e1 100644 --- a/plugins/auth-backend/src/providers/oauth2/provider.ts +++ b/plugins/auth-backend/src/providers/oauth2/provider.ts @@ -148,7 +148,7 @@ export class OAuth2AuthProvider implements OAuthHandlers { const { profile } = response; if (!profile.email) { - throw new Error('Profile does not contain a profile'); + throw new Error('Profile does not contain an email'); } const id = profile.email.split('@')[0];