Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 033b6d9

Browse files
Merge pull request #745 from NothingInteractive/fix/ios-firauth
Check that firebase is configured before calling FIRAuth.auth()
2 parents 690850b + b5585cf commit 033b6d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/firebase.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function addBackgroundRemoteNotificationHandler(appDelegate) {
5757
if (typeof(FIRMessaging) !== "undefined") {
5858
appDelegate.prototype.applicationDidReceiveRemoteNotificationFetchCompletionHandler = (app, notification, completionHandler) => {
5959
// Pass notification to auth and check if they can handle it (in case phone auth is being used), see https://firebase.google.com/docs/auth/ios/phone-auth
60-
if (FIRAuth.auth().canHandleNotification(notification)) {
60+
if (firebase._configured && FIRAuth.auth().canHandleNotification(notification)) {
6161
completionHandler(UIBackgroundFetchResult.NoData);
6262
return;
6363
}

0 commit comments

Comments
 (0)