File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,20 @@ export function getAuth(app: FirebaseApp = getApp()): Auth {
71
71
return provider . getImmediate ( ) ;
72
72
}
73
73
74
+ // Only warn if getAuth() is called before initializeAuth()
74
75
_logWarn ( NO_PERSISTENCE_WARNING ) ;
75
76
76
77
return initializeAuthOriginal ( app ) ;
77
78
}
78
79
80
+ /**
81
+ * Wrapper around base `initializeAuth()` for RN users only, which
82
+ * shows the warning message if no persistence is provided.
83
+ * Double-checked potential collision with `export * from './index.shared'`
84
+ * as `./index.shared` also exports `initializeAuth()`, and the final
85
+ * bundle does correctly export only this `initializeAuth()` function
86
+ * and not the one from index.shared.
87
+ */
79
88
export function initializeAuth ( app : FirebaseApp , deps ?: Dependencies ) : Auth {
80
89
if ( ! deps ?. persistence ) {
81
90
_logWarn ( NO_PERSISTENCE_WARNING ) ;
You can’t perform that action at this time.
0 commit comments