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

Commit ecc4ad7

Browse files
committed
Return the GIDSignIn id token when login with Google on iOS
1 parent 10df6a8 commit ecc4ad7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/firebase.ios.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,8 @@ function toLoginResult(user, additionalUserInfo?: FIRAdditionalUserInfo): User {
631631
providers.push({id: pid, token: FBSDKAccessToken.currentAccessToken ? FBSDKAccessToken.currentAccessToken.tokenString : null});
632632
} else if (pid === 'google.com' && typeof (GIDSignIn) !== "undefined" && GIDSignIn.sharedInstance() && GIDSignIn.sharedInstance().currentUser) {
633633
// include web compatible oauth2 token
634-
const gidCurrentAccessToken = GIDSignIn.sharedInstance().currentUser.authentication.accessToken;
635-
providers.push({id: pid, token: gidCurrentAccessToken });
634+
var gidCurrentIdToken = GIDSignIn.sharedInstance().currentUser.authentication.idToken;
635+
providers.push({ id: pid, token: gidCurrentIdToken });
636636
} else {
637637
providers.push({id: pid});
638638
}

0 commit comments

Comments
 (0)