Open r0zar opened 6 years ago
Hi!
Just wondering.. what's IP:
(in the title)?
Can you also share a reference to the iOS and Android SDK's please (this plugin doesn't use the web api).
Ah, improvement proposal. I took the idea from bitcoin's BIPs.
I'm still looking for the source in the firebase android docs- but at least found this: https://github.com/firebase/FirebaseUI-Android/blob/master/auth/README.md#smart-lock which is somewhat close.
I'm not picky on implementation, just want to have a 'remember me' feature somehow in my app.
If you had to roll your own implementation (because the SDK may not provide it, and FirebaseUI is not used in the project either), how would you do it?
A simple implementation would be when 'remember me' is toggled, closing the app would not logout their session with firebase. If it's not toggled, users should be logged out when closing the app.
I'll look into the docs on events related to closing apps. Possibly build a service around that.
Keen on seeing this functionality as well. Currently, after the user logs in, as expected the getAuthToken()
returns a valid token. If the user switches to another app and after an hour switches back to our app, the the getAuthToken() still returns a token but it's already expired.
@r0zar let me know if I can help you out somehow.
I believe it requires adding support for
firebase.auth().setPersistence()
to:https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/src/platforms/android/typings/auth/android.d.ts
Reference: https://firebase.google.com/docs/auth/web/auth-state-persistence