cloudflare-next-intl 0.7.6 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -327,9 +327,15 @@ export default function AuthUserProvider({ initialUser = null, children }) {
|
|
|
327
327
|
}
|
|
328
328
|
finally {
|
|
329
329
|
await clearSession(sessionCookieName, refreshTokenCookieName, emailVerifiedHintCookieName, appCheckTokenCookieName, refreshTokenMaxAge);
|
|
330
|
-
|
|
330
|
+
// Whitelisted paths opt out of every other auth redirect in this
|
|
331
|
+
// provider (see the effect above), so an explicit `logout()` from
|
|
332
|
+
// one must not bounce either — a page like a delete-account flow
|
|
333
|
+
// signs the user out as a STEP and still needs to render its own
|
|
334
|
+
// result afterwards.
|
|
335
|
+
if (!isWhiteListed)
|
|
336
|
+
router.push(fa.redirectAuthPath);
|
|
331
337
|
}
|
|
332
338
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
333
|
-
}, [fa.redirectAuthPath, sessionCookieName, refreshTokenCookieName, emailVerifiedHintCookieName, appCheckTokenCookieName]);
|
|
339
|
+
}, [fa.redirectAuthPath, sessionCookieName, refreshTokenCookieName, emailVerifiedHintCookieName, appCheckTokenCookieName, isWhiteListed]);
|
|
334
340
|
return _jsx(AuthUserContext.Provider, { value: { ...state, reloadUser, sendVerificationEmail, logout }, children: children });
|
|
335
341
|
}
|