Skip to content
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

setPersistence in AngularFire _BrowserLocalPersistence cannot be invoked without 'new'` #3550

Open
omtagline opened this issue Jun 20, 2024 · 1 comment

Comments

@omtagline
Copy link

omtagline commented Jun 20, 2024

Problem
The setPersistence method does not work when imported from @angular/fire/auth, leading to a TypeError. However, it works when imported from firebase/auth.

Error
When using the import from @angular/fire/auth, the following error is encountered:

ERROR TypeError: Class constructor _BrowserLocalPersistence cannot be invoked without 'new'
Code Example

  • Non-functional:
    import { setPersistence, browserLocalPersistence } from '@angular/fire/auth';
    await setPersistence(this.auth, browserLocalPersistence);

  • Functional:
    import { setPersistence, browserLocalPersistence } from 'firebase/auth';
    await setPersistence(this.auth, browserLocalPersistence);

@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@omtagline omtagline changed the title Issue Report: setPersistence in AngularFire setPersistence in AngularFire _BrowserLocalPersistence cannot be invoked without 'new'` Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants