Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google SignIn in Android and IOS with backend server

I am developing an app in Android and IOS. I want to use the Google Sign In to login in the app.

In Android I use the client ID of the backend server, but in IOS I have to use the IOS app client ID to login.

Is not possible to use the backend server client ID in the IOS app?

Google Documentation

https://developers.google.com/identity/sign-in/ios/backend-auth

Regards

like image 408
rmh Avatar asked Nov 25 '16 14:11

rmh


People also ask

Does Google sign in use JWT?

The JWT ID Token is only needed during Sign-in. We just need to validate it once during Sign-in like so: client. verifyIdToken({idToken: token, audience: CLIENT_ID}) . The ID Token is not used to Authenticate a user to My Web App.

How do I sign into Google on iOS?

On your iPhone or iPad, open the Safari app. Go to www.google.com. Tap your profile image or Sign in. Follow the sign-in steps.

What is Id_token Google?

The id_token is used in OpenID Connect protocol, where the user is authenticated as well as authorized. (There's an important distinction between authentication and authorization.) You will get id_token and access_token. The id_token value contains the information about the user's authentication.


1 Answers

I work on the team at Google: yes, unfortunately, this is a known deficiency and inconsistency of the iOS SDK for Google Sign-In. We're working on some changes and I'll update this answer when this is resolved.

For now, your backend server will have to determine what client the token is coming from and check appropriate audience. Very sorry for the trouble :/

like image 153
Steven Avatar answered Oct 28 '22 21:10

Steven