-
Notifications
You must be signed in to change notification settings - Fork 966
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
How to validate an auth token in my custom backend? #3307
Comments
After a bit of searching and exploring, here is how I solved my issue : When trying to reuse the Authorization code generated from the first login response, I needed a redirect_uri in my backend, so you're forced to add it inside the Google Play console, add http://localhost:port/xx as your redirect uri in the console, then add it in the oauth configuration builder in nodejs. After doing this, I realized I needed more scopes, and that my backend would fail because unity does not request enough scope, even though they are enabled in my google cloud console. The only solution to this is downgrading the unitypackage version to 0.10.14, and using PlayGamesClientConfiguration.RequestScopes(); I hope this helps someone who runs through this in the future, and I hope the ability to request new scopes is added, every other SDK (Facebook, Apple Sign in, ... ) allows me to at least get the user's email. It makes no sense for the most basic scope to request on the google console to be removed. |
Unfortunately, scopes are removed in Play Games Services v2 SDK (for security reasons probably). So GPGS devs can't do anything with this. 0.10.14 is a bad option as it will be impossible to build with it soon (due to new Google requirements). |
Can someOne bring example - How to get PlayerID (crossGame on your account) it's bring error all the time: Error: HTTP/1.1 401 Unauthorized |
Hi, the latest asset version uses V2 and does not support scopes. |
Are Next Generation Player IDs now different for each game? The documentation mentions using the "developer player key" for cross-game player IDs, but there are no examples of how to obtain it. Also, what if I need a cross-game and cross-developer unique player ID for a Friend List system (where friends from other games appear in the roster, and you can invite/join them with the same player ID across games)? |
Implement your own auth system on your backend where an unique ID is your player profile's ID. You can also try Simple Sign In with Google or Play ID, they are based on web OAuth and support scopes, it will also give you Google account ID that is cross-platform (rather than Play Games ID). |
I want to benefit from the classic google play auth experience, but i want to use my own backend once the user is logged in.
I don't want to go through the entire process in android, and then start using my backend to do CRUD, because it is very insecure.
Ultimately, I would like to either :
I have failed to implement both these things, and I am not sure how to work around them, I don't understand if i should be using the android's client_id and (there is no secret?), or a web client_id secret_id, or should i just use neither, i am completely lost on how to go forward here
here are snippets from my backend for more context :
none of these methods work, among other things i've tried, with both the auth token and the access token
The text was updated successfully, but these errors were encountered: