set raw state to ClientProviders auth state

This commit is contained in:
dswbx
2025-10-17 08:47:00 +02:00
parent 511c6539fb
commit e68e5792be

View File

@@ -44,10 +44,9 @@ export const ClientProvider = ({
...apiProps,
verbose: isDebug(),
onAuthStateChange: (state) => {
const { token, ...rest } = state;
props.onAuthStateChange?.(state);
if (!authState?.token || token !== authState?.token) {
setAuthState(rest);
if (!authState?.token || state.token !== authState?.token) {
setAuthState(state);
}
},
}),