Skip to content

Sample project not working anymore #35

@banerjee-toy

Description

@banerjee-toy

Since last few days, the unity google sign in sample is not working anymore. It did work earlier however now it throws DeveloperError with 'Google.GoogleSignIn+SignInException'. Please help.

Activity

lightbringer

lightbringer commented on Mar 23, 2018

@lightbringer

You are most likely passing a wrong webclientId into the sample script. Make sure the id was created as "web application" in the Oauth2 client id section in the developer console of your project.
(I spent a day to figure out that an "android" key does not work if you set GoogleSignIn.Configuration.RequestIdToken to true; even if an Android App is what you're building)

alwaysakil

alwaysakil commented on Mar 31, 2018

@alwaysakil

SAme exception here.
trying with firebase.
'Google.GoogleSignIn+SignInException'. Please help.

lightbringer

lightbringer commented on Mar 31, 2018

@lightbringer

Ok, your Google project has to have to Oauth clients configured:

  • One web client (A)
  • One Android client (B) (make sure that you sign the apk and enter the key's finger print in the Google project)
  • Enter the web client's id (A) into the unity project

I tried the Unity sample myself last week. It works. It's purely a configuration error on your Google project.

alwaysakil

alwaysakil commented on Mar 31, 2018

@alwaysakil

I guessed so. Let me try again from scratch. and come back with results!

timtimma

timtimma commented on Apr 19, 2018

@timtimma

Same exception here.'Google.GoogleSignIn+SignInException'.
I have tried two Oauth client ids(web application one and android one) with sample project. Both not work
Please help.

Syrlander

Syrlander commented on Apr 19, 2018

@Syrlander

@timtimma I'm currently having the same issue, in my project I have found that the error occurs with the following code, on line 47-48 in the sample:
GoogleSignIn.DefaultInstance.SignIn().ContinueWith( OnAuthenticationFinished);

I don't know if anyone has a solution yet, I have at least tried several ideas from other people, but nothing seems to work...

alwaysakil

alwaysakil commented on Apr 22, 2018

@alwaysakil

I got it working. It had to do with me creating credentials on my own and mixing it up with Firebase's own credential creating ...
Yes it gets a while to configure it correctly..

natalvenetz

natalvenetz commented on Apr 26, 2018

@natalvenetz

Tried a lot of different configurations, but none of them worked out for me. Here are the exact steps i took:

  1. Created new GCP Projekt added
  2. Created new Oauth client ID Credentials under APIs & Services
    Application Type: Web application
    Did not set any Restirctions at all and clicked on Create
  3. Generated an new keystore in Unity and got the Signing-certificate fingerprint from it
  4. Created another Oauth client ID Credentials under APIs & Services
    Application Type: Android
    Added the SHA-1 Signing-certificate fingerprint and the correct package name and then clicked on Create
  5. Added the Client ID from the Web client Oauth credentials to the SigninSampleScript
  6. Connected my Android phone to the computer, clicked on build and run
  7. Clicked on Sign In in the android app
  8. Got Error: Google.GoogleSignIn+SignInException

Is it ag Bug? Did something change in the Way you have to create the Credentials?

mjmac87

mjmac87 commented on May 23, 2018

@mjmac87

I struggled with this for a while until I came across the following:

keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore

Don't get the SHA-1 from your unity project. You need the debug version instead which is tied to your computer+android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lightbringer@alwaysakil@mjmac87@natalvenetz@timtimma

        Issue actions

          Sample project not working anymore · Issue #35 · googlesamples/google-signin-unity