Reputation: 13
I have React native app that store encrypted storage. But when i wanna get value from Encrypted Storage it return {"_h": 0, "_i": 0, "_j": null, "_k": null}
. Is something wrong? i'm using react-native-encrypted-storage
This my code when getting value from Encrypted Storage
export async function getToken() {
try {
return await EncryptedStorage.getItem('token');
} catch (error) {
}
}
Upvotes: 1
Views: 5993
Reputation: 36
I had a similar problem today with asyncStorage, but solution may apply to your problem.
Try this:
return await EncryptedStorage.getItem('token').then((response) => {return response});
Upvotes: 2