Skip to content

Commit 7536c1b

Browse files
authored
fix(auth): update organization check logic in HybridAuthGuard to include skipOrgCheck condition (#2253)
1 parent 7cabb5d commit 7536c1b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/api/src/auth/hybrid-auth.guard.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ export class HybridAuthGuard implements CanActivate {
166166
}
167167

168168
// Fetch member data for role and department info
169-
// Skip if no active org (e.g., /auth/me during onboarding)
169+
// Skip if no active org or if org check is skipped (e.g., during onboarding)
170170
let userRoles: string[] | null = null;
171-
if (organizationId) {
171+
if (organizationId && !skipOrgCheck) {
172172
const member = await db.member.findFirst({
173173
where: {
174174
userId: user.id,

0 commit comments

Comments
 (0)