File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 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 {
7171 return provider . getImmediate ( ) ;
7272 }
7373
74+ // Only warn if getAuth() is called before initializeAuth()
7475 _logWarn ( NO_PERSISTENCE_WARNING ) ;
7576
7677 return initializeAuthOriginal ( app ) ;
7778}
7879
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+ */
7988export function initializeAuth ( app : FirebaseApp , deps ?: Dependencies ) : Auth {
8089 if ( ! deps ?. persistence ) {
8190 _logWarn ( NO_PERSISTENCE_WARNING ) ;
You can’t perform that action at this time.
0 commit comments