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'.
This commit is contained in:
giancarlo
2024-05-10 23:43:49 +07:00
parent 3740ed642a
commit 1f75a84c8f

View File

@@ -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,
},
};