baumblatt / capacitor-firebase-auth

Capacitor Firebase Authentication Plugin
MIT License
261 stars 129 forks source link

Login with Facebook IOS fires an error #192

Open nicolardi opened 2 years ago

nicolardi commented 2 years ago

Hi,

I am facing with an issue with facebook login on IOS

I am using this code

cfaSignInFacebook().subscribe(
            (user) => {
            alert("SUCCESS");

          },
          (err) => {
            alert("ERROR"+JSON.stringify(err));
            console.log(JSON.stringify(err));
          }
       )

The app opens facebook's login screen. I login and I am redirected to the app but I am getting this error message:

{"code":"app/no-app","customData":{"appName":"[DEFAULT]"},"name":"FirebaseError"}

and using "safari" remote debugger tool I have another error message:

FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app).

My initialization code into AppDelegate.swift is

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.

        ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
        FirebaseApp.configure()

        return true
    }

I am using capacitor latest with capacitor/ios 3.2.3 and capacitor-firebase-auth 3.1.2-rc.3

Am I missing anything?

Thanks