-
Notifications
You must be signed in to change notification settings - Fork 977
Closed
Labels
Description
I am using firesbase-js-sdk with capacitor. In iOS, Calling signInWithCredential successfully creates or logs in a user in Firebase, but the promise does not resolve. In the following code, neither .then or .catch blocks run. The promise hangs indefinitely.
export const googleLogin = async () => {
// 1. Create credentials on the native layer
const result = await FirebaseAuthentication.signInWithGoogle()
// 2. Sign in on the web layer using the id token
const credential = GoogleAuthProvider.credential(result.credential?.idToken)
const auth = getAuth()
await signInWithCredential(auth, credential)
.then((response) => console.log(response))
.catch((err) => console.log(err))
}
The promise is resolved as expected in the web app. I tested this on iOS 14.5 (iPhone 8, simulator) and iOS 14.7.1 (iPhone 8, physical).
Here is another discussion about it: robingenz/capacitor-firebase-authentication#78