fix(): redirect loop + signout (#8899)

This commit is contained in:
Antoine Moreaux
2024-12-05 16:24:24 +01:00
committed by GitHub
parent 11d244194f
commit f4c5d03b98
5 changed files with 26 additions and 20 deletions

View File

@ -45,9 +45,9 @@ export const cookieStorageEffect =
): AtomEffect<T | null> =>
({ setSelf, onSet }) => {
const savedValue = cookieStorage.getItem(key);
if (
isDefined(savedValue) &&
savedValue.length !== 0 &&
(!isDefined(hooks?.validateInitFn) ||
hooks.validateInitFn(JSON.parse(savedValue)))
) {