extension-gpgs
extension-gpgs copied to clipboard
Add Email and Profile Info Scope
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()
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?
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.
- PR: #49