mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
set raw state to ClientProviders auth state
This commit is contained in:
@@ -44,10 +44,9 @@ export const ClientProvider = ({
|
|||||||
...apiProps,
|
...apiProps,
|
||||||
verbose: isDebug(),
|
verbose: isDebug(),
|
||||||
onAuthStateChange: (state) => {
|
onAuthStateChange: (state) => {
|
||||||
const { token, ...rest } = state;
|
|
||||||
props.onAuthStateChange?.(state);
|
props.onAuthStateChange?.(state);
|
||||||
if (!authState?.token || token !== authState?.token) {
|
if (!authState?.token || state.token !== authState?.token) {
|
||||||
setAuthState(rest);
|
setAuthState(state);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user