nraboy / ng-cordova-oauth

AngularJS oauth library for use with Apache Cordova projects
https://www.thepolyglotdeveloper.com
MIT License
456 stars 199 forks source link

Question about the facebook login #291

Closed cfontana0 closed 7 years ago

cfontana0 commented 7 years ago

Hey Nic, how are you?I have an issue that maybe it is simple to fix. I login with FB, and put the email and password, and everything works fine. I call the same function to login again with facebook, but I have to put the email and password again (it doesn't keep the previous login session). Is it possible to keep opened the session on facebook? Just like other apps.

Another case, on my phone, I have the fb session opened on Safari, however, the plugin doesn't detect that, so, I have to put the login information again.

Thanks!

nraboy commented 7 years ago

The library is sandboxed so you cannot use the credentials obtained by other apps and other apps cannot use the credentials obtained by your Ionic app. If you want to prevent login, save the access token and expiration time to storage, then add logic to determine whether or not you should re-authenticate.

Best,