-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A non-serializable value was detected in the state, in the path: auth.user
#169
Comments
auth.user
also we needed to change this on all other places where you make user of the user:
I have created a fork here: |
I'd also like to get rid of non-serializable warning. We're using Redux Toolkit which includes serializable checks for state as a default dev-only middleware (https://redux-toolkit.js.org/api/other-exports#createserializablestateinvariantmiddleware) and I'll be happier without warnings which I should always ignore. |
Any updates on this? I am also using the redux toolkit and the console is getting quite cluttered over here. I did manage to temporarily disable the serializable check, but this is not a valid fix for anything. This just gives me back my console. import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit'
...
const store = configureStore(
{
reducer: YOUR_REDUCER(S)_HERE,
middleware: [
...getDefaultMiddleware({
serializableCheck: false
}),
...otherMiddlewares
],
devTools: process.env.NODE_ENV !== 'production' ? { CONFIG_GOES_HERE } : false
}
); This disables the check for serializable data in you store, so i wont recommend this as a fix to the problem. |
Adding onto @japalo solution, you can disable the serializationCheck specifically just for the oidc reducer by providing the options below:
Documentation on these options for redux-toolkit can be found on the redux-toolkit docs. |
Challenge
When we integrate the redux-oidc state into our project, we get the following error on all store calls:
The problem seems to be that the user object is a class
Our fix
We could fix that, by rewriting the following method inside
src/OidcProvider.js
:Parts of our code
This is how we make use of the reducer:
And this is the callback component
The text was updated successfully, but these errors were encountered: