extension-gpgs icon indicating copy to clipboard operation
extension-gpgs copied to clipboard

Add Email and Profile Info Scope

Open wanderer056 opened this issue 1 year ago • 3 comments

Currently, the plugin doesn't have a way to request for email and profile info while SignIn. Add a flag that can be configured in game.project for email and ProfileInfo. The game.project configuration will look like:

[gpgs]
app_id = 29489714610
use_saved_games = 1
request_server_auth_code = 0
request_id_token = 1
client_id = somestring.google.com
request_email = 1
request_profile_info = 1

Add functions for email and profile info:

gpgs.get_email()
gpgs.get_profile()

wanderer056 avatar Feb 09 '24 08:02 wanderer056

Function to get email: https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/GoogleSignInAccount#getEmail()

@wanderer056 which function would gpgs.get_profile() correspond to?

britzl avatar Feb 11 '24 10:02 britzl

builder.requestProfile() adds displayName,givenName,familyName,Id,photoUrl along with email. https://developers.google.com/identity/sign-in/android/people I was thinking that these could be combined and returned as a json string when gpgs.get_profile() is called. Or should it be made individual functions? @britzl Below is the draft PR i am working on.

wanderer056 avatar Feb 11 '24 16:02 wanderer056

  • PR: #49

wanderer056 avatar Feb 12 '24 05:02 wanderer056