From 1f75a84c8f5073046f07d313ebd6eec06b9e8b08 Mon Sep 17 00:00:00 2001 From: giancarlo Date: Fri, 10 May 2024 23:43:49 +0700 Subject: [PATCH] Add scope options for Azure OAuth provider Added a new feature that checks for an Azure provider and accordingly sets the scope for OAuth authentication. With this addition, the scope for the Azure provider in the 'oauth-providers' module is explicitly set to 'email'. --- packages/features/auth/src/components/oauth-providers.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/features/auth/src/components/oauth-providers.tsx b/packages/features/auth/src/components/oauth-providers.tsx index ff67055e2..414e515c8 100644 --- a/packages/features/auth/src/components/oauth-providers.tsx +++ b/packages/features/auth/src/components/oauth-providers.tsx @@ -75,10 +75,18 @@ export function OauthProviders(props: { const redirectTo = [origin, redirectPath].join(''); + const scopesOpts = + provider === 'azure' + ? { + scopes: 'email', + } + : {}; + const credentials = { provider, options: { redirectTo, + ...scopesOpts, }, };