Google sign-in

I’ll second this, its crazy that theres no warning that your documentation is outdated with wrong steps :confused: Super unfortunate…

1 Like

This week I just started to check how Unity Authentication works and I’m also very confused about how to put it to work without needing to use Google Play Games, since my game is supposed to run on WebGL and Standalone where I cannot have Google Play Games SDK.

Any news on this?

This asset can perform Google Sign-in on all platforms without any native libs like GPGS

The only minor disadvantage is that users are navigated to Google website to sign in.

The current options are:

  1. GPGS v10.14 - outdated, uses Play Games Services v1 SDK, but you can request any access scopes you need, get email and deal with id_token (JWT). Still works with latest Unity versions.
  2. GPGS v11.01 - latest, uses Play Games Services v2 SDK, but is very limited (no email, no access scopes, no JWT, it can povide only user ID and name, though it still supports PlayGamesPlatform.Instance.RequestServerSideAccess for getting user data on the server side). Still works with latest Unity versions.
  3. Google Sign-In SDK - deprecated, the unity package was updated 6 years ago. Some users said it still works.
  4. Android Credential Manager API - a new approach by Google, no support from Unity side.
  5. Use Simple Google Sign-In asset based on web oauth (no in-app dialog, users are redirected to Google website to sign in).

So I’m joining to this request - will Unity provide a way for simple Google sign-in without Play Services?

3 Likes

+1 for this problem

2 Likes

Hi @Julian-Unity3D , do you have any new for us about this feature?

1 Like

Hey @Julian-Unity3D , Noticed you aren’t a support engineer as of two months ago, but could you please update this post with someone that is. So we can get some feedback as to when we can expect GOOGLE AUTH, not Google play(nobody wants).

Thank you!

3 Likes

Nobody wants google play :wink:

Hey everyone,

I’ve since changed roles and I am now working in an entirely different department. It does mean I’m not as active on the forum anymore as it is not part of my new role. You may see me occasionally on the engine side of the forums though. I do appreciate your patience on this ongoing issue.

I am currently speaking with previous team members so that we give you the right support.

Once again, thank you for the ongoing patience you have shown.

2 Likes

Any updates?

Thanks @Julian-Unity3D . We would really appreciate it if you could ping the new responsible for the Authorization package here.

1 Like

Hi everyone,
A quick update here.

Authentication currently doesn’t support Google Login with Web GL.
We don’t have any tutorials and guidance at this time.

If you have your own Google Login code, then you may be able to send that information to Authentication through open id. Here are the docs for OpenID with Authentication.

Looking through existing’s assets for this use case there seems to be a few available that may speed up the process. However we haven’t tested any of these assets and can’t confirm if these assets would accomplish what is needed.

I will bring this thread up to our team members to see what next steps can be take to accomplish what people are looking to achieve.

Thank you for your feedback.

3 Likes

Even just a clear documentation regarding Google login will be very helpful! Thank you for your response!

Im so sorry that Im oprning this thread again, but please, what is the right way at this moment? It is possible to implement just Google sign in to android game (not google play games), and how? The tutorial on web in Authentication isnt working, I did everything step by step by looking in docs and I still getting failed authentication attempts.

Dont you have any other docs how to implement it right way?

One more question - Do I have to create OAuth for Android app, or just Web App is enough to set it up?

Thank you so much and Im sorry once more for reopening this thread.

3 Likes

This asset works for all platforms via OAuth 2.0
https://forum.unity.com/threads/simple-google-sign-in.1469672/

2 Likes

When I first realized tests on the Unity Authentication, that is exactly what I was waiting for.
Not sure why 3rd Party tools are so much better than the Built-in features?

Thanks @hippogames , I will probably have to use your asset very soon.

1 Like

Would be great to have a discount… sorry 20E too much for my budget. =(

The Google Sign In Plugin for unity is unmaintained for last 6 years, and you need to do some workaround to make it work.

So, to implement the google sign in I recommend using Oauth2.0. There is a free plugin called “i5 Toolkit For Unity” which you can use to implement the OAuth2.0.

After you authenticate your user with the OpenID, you can get a token from the callback and use that token to authenticate your user to other services, for example firebase.

I have created a step by step process on how to do it. Sharing it here as well in case anyone interested.

4 Likes

Greeting everyone

I have fork Google SignIn package to make it importable as UPM. Also now it was upgraded to use the latest version of signin library for ios and CredentialManager for android because google signin for both platform has recommendation for migration

Here is my forked repo GitHub - Thaina/google-signin-unity at newmigration

You can compare the changes here Recent migration attempt by Thaina · Pull Request #256 · googlesamples/google-signin-unity · GitHub

Or just add these 2 lines to your manifest.json project to import this package into your project

{
  "dependencies": {
    "com.google.external-dependency-manager": "https://github.com/googlesamples/unity-jar-resolver.git?path=upm",
    "com.google.signin": "https://github.com/Thaina/google-signin-unity.git#newmigration",
    ...
  }
}

external-dependency-manager is required dependency, if it already in your project then you can just omit that line

2 Likes