Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample project not working anymore #35

Open
banerjee-toy opened this issue Mar 11, 2018 · 9 comments
Open

Sample project not working anymore #35

banerjee-toy opened this issue Mar 11, 2018 · 9 comments

Comments

@banerjee-toy
Copy link

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.

@lightbringer
Copy link

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
Copy link

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

@lightbringer
Copy link

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
Copy link

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

@timtimma
Copy link

timtimma commented Apr 19, 2018

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
Copy link

Syrlander commented Apr 19, 2018

@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
Copy link

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
Copy link

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
Copy link

mjmac87 commented May 23, 2018

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants