question

shakee93 avatar image
shakee93 asked

Save the email ID of the user after the player logs in the game.

I'm looking for authentication service for a game built in unity. The game should allow the user to sign in using his gmail ID/google play account. As soon as the user logs in, I should be able to retrieve the person's email ID and store it in the database. Can I do that using playfab? If yes then please point me towards the proper documentation.

Authentication
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Yes, you can sign any number of players into your title using a range of authentication systems. See our Login... API calls in the Client API here, for more info: https://api.playfab.com/documentation/client. We also have a tutorial on best practices in login we'll be posting to our tutorials page shortly (there's an older blog post here - https://blog.playfab.com/blog/first-impressions-count-best-practices-friction-free-player-authentication/ - it has some images that are no longer valid, and that we need to update, but the content is still good).

However, being able to sign in using Google Play does not automatically give you access to a player's email address, as Google does not necessarily provide you with access to that - it depends upon the user's privacy settings. If it is available, it'll be in the profile information for the user, which you can access via the PlayStream segments, leaderboards, and/or event archive (and we'll be providing more ways in future).

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.