Skip to content

Commit 2b6cb7e

Browse files
committed
chore(auth): remove redundant role override in customSession
The admin plugin already includes role on the user object. No need to manually spread it in customSession.
1 parent f51e1d9 commit 2b6cb7e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

apps/sim/lib/auth/auth.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,10 +649,7 @@ export const auth = betterAuth({
649649
expiresIn: 24 * 60 * 60, // 24 hours - Socket.IO handles connection persistence with heartbeats
650650
}),
651651
customSession(async ({ user, session }) => ({
652-
user: {
653-
...user,
654-
role: (user as unknown as { role?: string }).role ?? 'user',
655-
},
652+
user,
656653
session,
657654
})),
658655
emailOTP({

0 commit comments

Comments
 (0)