question

rim2812 avatar image
rim2812 asked

How i can login with google account in UnrealEngine ?

I am try login with google account, but does not work.

Player secret i take from google console (client_secret). But where i can take "Server Auth Code" ? It same that "client_id"?

unreal
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

·
Hernando avatar image
Hernando answered

ServerAuthCode is not the same thing with the Client ID.

ServerAuthCode will be obtained on the client from Google Server after you authenticate the user using Google Sign-In, which you can then send for authentication to PlayFab. (more information please see: https://docs.microsoft.com/en-us/rest/api/playfab/client/authentication/loginwithgoogleaccount?view=playfab-rest)

So, before calling LoginWithGoogleAccount, the process of getting ServerAuthCode is beyond the service scope of PlayFabSDK. And you'll need to implement this login logic in ue4. ( In the Unity case, we provide very detailed tutorials and demo on it, maybe you can get help from it: Setting up PlayFab authentication using Google Play games sign-in in Unity & https://github.com/PlayFab/PlayFab-Samples/blob/master/Recipes/GoogleSignInSample/Assets/Example/Scripts/SignInExample.cs#L45)

Besides, we also recommend you to send a thread on Google or Unreal community forum where you can get help from other perspectives.

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.