似乎有使用的加密選項的問題終極版 - 堅持反應母語:反應原生堅持和加密用戶令牌 - 終極版 - 堅持 - 轉換 - 加密錯誤
https://github.com/maxdeviant/redux-persist-transform-encrypt/issues/15
能任何人的幫助任何解決方案/解決方法使用REDX堅持加密和存儲登錄令牌在react-native?
當我嘗試使用了Redux堅持用了Redux-堅持變換,加密我得到 Redux-persist-transform-encrypt: expected outbound state to be a string error
import { createStore, compose, applyMiddleware } from 'redux';
import ReduxThunk from 'redux-thunk';
import { persistStore, autoRehydrate } from 'redux-persist';
import { AsyncStorage } from 'react-native';
import createEncryptor from 'redux-persist-transform-encrypt';
import reducers from './reducers';
const store = createStore(
reducers,
{},
compose(
applyMiddleware(ReduxThunk),
autoRehydrate(),
),
);
const encryptor = createEncryptor({
secretKey: 'my-super-secret-key-999',
});
persistStore(
store,
{
storage: AsyncStorage,
whitelist: ['auth'],
transforms: [encryptor],
},
);
export default store;
我的身份驗證狀態是這樣的:
const INITIAL_STATE = {
user: null,
token: ''
};
有什麼解決方案使用redux-persist-transform加密或轉換和其他包使用redux時加密令牌堅持?