You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
This issue does not seem to follow the issue template. Make sure you provide all the required information.
omtagline
changed the title
Issue Report: setPersistence in AngularFire
setPersistence in AngularFire _BrowserLocalPersistence cannot be invoked without 'new'`
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);
The text was updated successfully, but these errors were encountered: