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

Google Sign-In Silent Login Fails After First-Time Login in Unity (Need Sample Unity Package) #272

Open
shiva30122 opened this issue Feb 10, 2025 · 1 comment

Comments

@shiva30122
Copy link

I am integrating Google Sign-In authentication in Unity and need a simple demo project (Unity package) to make integration easy for others like me.

My Requirements:

I am using only WebClientId to retrieve the ServerAuthCode.

I do NOT need Firebase Auth just ServerAuthCode for PlayFab authentication.

First-time login works, but Silent Login (SignInSilently) fails after reopening the app.
I am using the latest Google Play Services Auth & Credential Manager API in my Unity project.
Issue Details:
On first-time login, everything works fine:
✅ User signs in
✅ ServerAuthCode is retrieved
However, when I close and reopen the app, silent login fails with this error:

Unity AndroidJavaException: java.lang.NullPointerException
Exception of type 'Google.GoogleSignIn+SignInException' was thrown.
onFailure class androidx.credentials.exceptions.GetCredentialCancellationException : activity is cancelled by the user.
Expected Solution:
A sample Unity project (.unitypackage) with proper Google Sign-In integration.
Ensure Silent Login works consistently after reopening the app.
Only retrieve ServerAuthCode (not Firebase authentication).
Use latest Credential Manager API for authentication.
Extra Notes:
My dependencies (dependencies.xml) include:xml

I have verified my WebClientId is correct.
I need a working Unity sample to easily integrate and test.

📌 Please provide a working Unity Package (.unitypackage) sample!
Would really appreciate help on fixing Silent Sign-In issues after app restart! 🚀🔥

@shiva30122
Copy link
Author

shiva30122 commented Feb 10, 2025

Image

Normal Login

Image

Silent Login Popup top down !!

Image

and the sample unity is also not working !....

any one can explain what mistake i did ???
steps to proper one by one pleaseeeee

give proper unity.package from scratch that has the hole project !!!!!...

and also a VIDEO hoe to Implement Google Sign YOUTUBE Video or any Platform !!!!>>>>......

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

1 participant