I'm trying to figure out a secure way to persist session in react native.
I have some sensitive data like access token retrieved from server that i'm planning to set to the redux state.
I'm not sure if it is safe to set sensitive data like accessToken to redux state.
If not safe, should i save the accessToken to device storage like react-native-keychain and load the accessToken on every screen request and server request?
dispatch({type: LOGIN_SUCCESS, payload: {refreshToken, authTimestamp, email} });
const INITIAL_STATE = {
token: {
accessToken: '',
loading: false,
error: ''
}
};