-
Notifications
You must be signed in to change notification settings - Fork 895
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 with LOCAL persistence not working from a Worker context #2903
Comments
@thebrianchen the auth should work or it also depends on |
Local persistence is the default for a worker environment. In a worker environment, |
It worked indeed! Thank you so much for the quick response @bojeil-google! It would be great if this information was linked somewhere in the docs e.g. |
Let's keep this open. I will send a quick fix to fix this. |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Steps to reproduce:
While using firebase auth within a web worker, with persistence set to
firebase.auth.Auth.Persistence.LOCAL
, console is logging theUNSUPPORTED_PERSISTENCE
error:The current environment does not support the specified persistence type.
Relevant Code:
Debugging the firebase code, the problem seems to be caused by isWebStorageSupported method, because it checks for
localStorage
before running thetry/catch
block but, as the Worker doesn't havelocalStorage
, it goes directly into the return statement:The text was updated successfully, but these errors were encountered: