style: auto-fix lint and format
This commit is contained in:
1 parent
7de2fc04ec
commit
afe5f2b6b4
1 file changed
+2
-10
+2
-10
@@ -35,16 +35,8 @@ export const createSignInEventHandler = (db: Database): Exclude<NextAuthConfig["
|
||||
// Some providers send a single group as a string instead of an array — normalize it.
|
||||
const oidcGroups = profile && groupsKey in profile ? profile[groupsKey] : undefined;
|
||||
const normalizedOidcGroups =
|
||||
oidcGroups !== undefined
|
||||
? Array.isArray(oidcGroups)
|
||||
? oidcGroups
|
||||
: [oidcGroups]
|
||||
: undefined;
|
||||
if (
|
||||
!env.AUTH_OIDC_GROUPS_LOCAL_MANAGEMENT &&
|
||||
dbUser.provider === "oidc" &&
|
||||
normalizedOidcGroups !== undefined
|
||||
) {
|
||||
oidcGroups !== undefined ? (Array.isArray(oidcGroups) ? oidcGroups : [oidcGroups]) : undefined;
|
||||
if (!env.AUTH_OIDC_GROUPS_LOCAL_MANAGEMENT && dbUser.provider === "oidc" && normalizedOidcGroups !== undefined) {
|
||||
logger.debug(`Using profile groups (${groupsKey}): ${JSON.stringify(normalizedOidcGroups)}`);
|
||||
await synchronizeGroupsWithExternalForUserAsync(db, user.id, normalizedOidcGroups as string[]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user