fix(auth): prevent redirect loops during auth callback processing in AuthProvider

This commit is contained in:
Usman Baig
2026-01-22 16:01:54 +01:00
parent 89bc9ed802
commit bf9b359cd6

View File

@@ -107,6 +107,9 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
if (!loading && user) {
// * If we are on onboarding, skip check
if (pathname?.startsWith('/onboarding')) return
// * If we are processing auth callback, skip check to avoid redirect loops
if (pathname?.startsWith('/auth/callback')) return
try {
const organizations = await getUserOrganizations()