Update [...nextauth].ts
Fixed issue where sign in would fail for existing user if DISABLE_NEW_SSO_USERS = true
This commit is contained in:
parent
9a287d1aef
commit
0158e58d90
|
@ -1186,7 +1186,7 @@ export default async function auth(req: NextApiRequest, res: NextApiResponse) {
|
|||
providerAccountId: account?.providerAccountId,
|
||||
},
|
||||
});
|
||||
if (existingUser && newSsoUsersDisabled) {
|
||||
if (!existingUser && newSsoUsersDisabled) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Ŝarĝante…
Reference in New Issue