Skip to content

Commit b706985

Browse files
committed
feat: add early return in AuthProvider for missing token, provider, and error
1 parent bd4ed51 commit b706985

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/providers/AuthProvider.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
103103
const provider = searchParams.get('provider')
104104
const error = searchParams.get('error')
105105

106+
if (!token && !provider && !error) {
107+
return
108+
}
109+
106110
if (error) {
107111
setAuthError({
108112
message: OAUTH_ERRORS[error] || OAUTH_ERRORS['default'],

0 commit comments

Comments
 (0)