mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
set raw state to ClientProviders auth state
This commit is contained in:
@@ -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);
|
||||
}
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user