question

blazej avatar image
blazej asked

Playfab account login via Google on Android and iOS platforms

Hi! I've probably searched the entire internet, but I have the impression that I haven't found anything... I have a question, how can I log in to playfab via a Google account (standard Google account)? What method or SDK should I use to obtain this server authorization key to make it work well on both platforms? Please give me some short sample code and explanation. Thank you very much in advance and best regards!

Player DataAccount Management
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

·
JayZuo avatar image
JayZuo answered

For Android platform, you can refer to Google Sign-In for Android (legacy). You will need to get the ServerAuthCode as per Enabling Server-Side Access.

Once you get the ServerAuthCode, you can then call LoginWithGoogleAccount to sign the user in using their Google account credentials.

iOS platform is similar, you can refer to Google Sign-In for iOS and macOS and Access Google APIs from your app backend to get the ServerAuthCode.

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.