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
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: