auth0 / react-native-lock

[DEPRECATED] A wrapper of Lock to use with React Native (iOS & Android)
MIT License
277 stars 77 forks source link

keep the user logged in #137

Closed AbdulrhmanBagazi closed 7 years ago

AbdulrhmanBagazi commented 7 years ago

I'm testing the auth0 on emulator for my app each time I refresh I have to log in again, is there is an easy way to make the user logged in even if he close the app or refresh

echelon-debug commented 7 years ago

Did you find a good solution for this? Also it would be nice to have the users credentials save so they are automatically signed in when they open the app.

hzalaz commented 7 years ago

You need to store the tokens yourself and handle the login state in your app, Lock provides no way of doing this now. Ideally you should store the tokens in a secure storage like iOS Keychain, also there is AsyncStore of RN but the token will be stored in plain text (in the app sandbox though).