File tree 2 files changed +9
-4
lines changed
packages/auth/src/platform_node
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @firebase/auth " : minor
3
+ ---
4
+
5
+ Update all persistences to map to ` inMemoryPersistence ` in Node, to avoid errors with server-side rendering
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import { _createError } from '../core/util/assert';
21
21
import { FirebaseApp , getApp , _getProvider } from '@firebase/app' ;
22
22
import { Auth } from '../model/public_types' ;
23
23
24
- import { initializeAuth } from '..' ;
24
+ import { initializeAuth , inMemoryPersistence } from '..' ;
25
25
import { registerAuth } from '../core/auth/register' ;
26
26
import { ClientPlatform } from '../core/util/version' ;
27
27
import { AuthImpl } from '../core/auth/auth_impl' ;
@@ -76,9 +76,9 @@ class FailClass {
76
76
}
77
77
}
78
78
79
- export const browserLocalPersistence = NOT_AVAILABLE_ERROR ;
80
- export const browserSessionPersistence = NOT_AVAILABLE_ERROR ;
81
- export const indexedDBLocalPersistence = NOT_AVAILABLE_ERROR ;
79
+ export const browserLocalPersistence = inMemoryPersistence ;
80
+ export const browserSessionPersistence = inMemoryPersistence ;
81
+ export const indexedDBLocalPersistence = inMemoryPersistence ;
82
82
export const browserPopupRedirectResolver = NOT_AVAILABLE_ERROR ;
83
83
export const PhoneAuthProvider = FailClass ;
84
84
export const signInWithPhoneNumber = fail ;
You can’t perform that action at this time.
0 commit comments