fix(providers): add authorization params for AzureAD (#8047)

https: //github.com/nextauthjs/next-auth/pull/5668

Co-authored-by: Andres Jose Sebastian Rincon Gonzalez <2531975+stianrincon@users.noreply.github.com>
This commit is contained in:
Thang Vu
2023-07-15 22:01:24 +07:00
committed by GitHub
parent a8d76ed440
commit ba58d48dba

View File

@@ -131,6 +131,11 @@ export default function AzureAD<P extends AzureADProfile>(
name: "Azure Active Directory",
type: "oidc",
wellKnown: `${rest.issuer}}/.well-known/openid-configuration?appid=${options.clientId}`,
authorization: {
params: {
scope: 'openid profile email User.Read',
},
},
async profile(profile, tokens) {
// https://docs.microsoft.com/en-us/graph/api/profilephoto-get?view=graph-rest-1.0#examples
const response = await fetch(