-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[firebase_auth] Authentication State Persistence #1714
Comments
We are currently running our first beta of our flutter web app. This leaves wishing for a better way to handle auth state persistence like described in the web auth documentation. |
I'm also developing a flutter web app, and also need to be able to set the persistance. In my case it appears that the default (which is "local" according to this https://firebase.google.com/docs/auth/web/auth-state-persistence) IS indeed what is occurring. But while that may make sense for android/ios apps, where it will normally be a device owner exiting/restarting an app, it makes less sense for web apps which are more likely to be used on devices which other people may use. It is arguably a dangerous default setting as it exposes users data unless they explicitly log out. So I would like to see the .setPersistence method added to this firebase_auth package (and/or the REST API) and/or a way to change the setting at the console level (perhaps via a security rule?) as my app will be primarily web-accessed. |
Has this been recognized as a gap at this point? Is there a work-around? :) |
Any updates? |
1 similar comment
Any updates? |
Any updates? |
Same here, after a reload auth.currentUser() becomes null.. |
there is a workaround here: #1918 Instead of this: |
Yeah, actually my implementation now has a timeout as well so it doesn't wait forever if something fails user = await _auth.onAuthStateChanged.timeout(
Duration(seconds: 1),
onTimeout: (eventSink) => eventSink.close()
)
.firstWhere(
(u) => u != null, orElse: () => null
); |
Hey 👋 Our rework of the See https://firebase.flutter.dev/docs/auth/usage#persisting-authentication-state For help migrating to the new plugins please see the new migration guide: https://firebase.flutter.dev/docs/migration |
How to implement Auth state persistence on flutter web using firebase_auth package. Like (LOCAL,SESSION AND NONE)
Previously using firebase package was able to implement this feature ---
But now i am unable to find this option in firebase_auth package after the support for web has been enabled.
The text was updated successfully, but these errors were encountered: