If the user does not exist in Firebase, in the first login it is registered and the variable isNewUser is true, but as in this case we log in a second time in the web layer, so this variable becomes false. That's why this variable is always returned to false, we have to return the first userCredential.
When I try to sign in using direct Google method as show in the code:
The variable userCredential.additionalUserInfo.isNewUser always returns false due to double login in the calling on native layer and in on web layer. See more in: https://github.com/baumblatt/capacitor-firebase-auth/blob/fb33374ae21e7eb7b0dda984f8c6f4a344360510/src/alternative/alternative.ts#L49
If the user does not exist in Firebase, in the first login it is registered and the variable isNewUser is true, but as in this case we log in a second time in the web layer, so this variable becomes false. That's why this variable is always returned to false, we have to return the first userCredential.