Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by G3R1 · Jul 01, 2017 at 09:30 AM · androidgoogle play gamesserviceauthentication

Google Play Services authentication problem. Failing to sign in !

Hi,

I am just testing the google play services with a simple Unity project to understand how google play services work so when I decide to integrate these services in the game that I am developing I know what I should do. So, I created an empty project in Unity and added one button for sign in and a text to display the message if the authentication was successful or failed. Then i downloaded google play services plugin for unity from github and imported the package in my project. The I went to google play console and created a new application step by step until everything turned green and ready to publish the game. I created a leaderboard also and then copied the resources from google play console and then in Unity i opened Window>Google Play Games>Setup>Android Setup, pasted the resources and and clicked Setup. Then it was completed. Then used these codes and assigned the text and the function of the sign in button. Here are the codes I am using:

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.UI;
 using UnityEngine.SocialPlatforms;
 using GooglePlayGames;
 
 public class Manager : MonoBehaviour {
 
     [SerializeField]
     private Text authenticationTxt;
 
     void Start () 
     {
         PlayGamesPlatform.Activate ();
         PlayGamesPlatform.DebugLogEnabled = true;
     }
 
     public void SignIn()
     {
         if (!Social.localUser.authenticated) {
             Social.localUser.Authenticate ((bool success) => {
                 if(success)
                 {
                     authenticationTxt.text = "Authenticated !";
                 }
                 else
                 {
                     authenticationTxt.text = "Failed Authentication";
                 }
             });
         }
     }
 
         //Haven't used this yet...
     public void ShowLeaderboard()
     {
         //...
     }
 
 }
 

I signed a keystore for my game in Unity and clicked build and run. When I run my game in my device i clicked the sign in button and waited to sign in but the authentication failed. I did include my email as a tester in google play console so this is not the problem. Now I have no idea why the authentication process is failing.

If anyone has encountered this same problem before would be nice to tell me.

Thank you, Gerald.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

6 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by G3R1 · Jul 01, 2017 at 03:54 PM

I found the solution here

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
2

Answer by taimur_azhar · Dec 08, 2017 at 01:55 PM

Listen carefully. Copy SHA-1 from "Upload certificate", not "App signing certificate". It saved my day.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image bachana707 · Oct 04, 2018 at 05:43 AM 0
Share

Thank You Broo <3 <3

avatar image DerpyGamerYT · May 15, 2020 at 05:15 PM 0
Share

I did that and it is still not working

avatar image
0

Answer by rahul20dec · Jun 07, 2019 at 09:30 AM

For me everything (appId , package name , SHA) was correct, but the problem was that I was using silent sign in and google play games was not installed on my phone, hence there was no pop up. When I turned off silent sign in the pop up to install GPG came up and the sign in was successful.

Silent sign in doesn't work when GPG is not installed.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by IgorAherne · Jan 02, 2020 at 02:20 AM

I was getting "Authentical Cancelled" and solved it via this post:

https://forum.unity.com/threads/google-play-services-not-working.485322/#post-3210077


basically, it occured because I allowed google to sign the application with its own key. It was apparent after I went to GooglePlayConsole-> Release Management --> App Signing.

"App Signing by Google Play is enabled for this app".


Because it was enabled, I had to bother about another web page "Google APIs". In there, I had to choose "My Game" from the dropdown in the ribbon, went into Credentials Tab and created a new credential with the appropriate SHA-1.

But the link (in this answer) explains it in more detail.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by cenk5355 · May 18, 2020 at 11:20 PM

You can check my article to sign in with google:

https://medium.com/@capcomin/unity3d-google-signin-for-android-ios-games-fd59e4b6f027

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

137 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Showing Google Play Game Leaderboard UI not working at all 4 Answers

Google Play Games Services - authentication fails 4 Answers

Unity 5 - Google Play NO Authentication 1 Answer

Google Play Services Authentication works only in Development Build? 1 Answer

Leaderboards for Android on Unity 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges