question

vitalyarkhipov avatar image
vitalyarkhipov asked

How to use LinkGoogleAccount for web application?

Hi there! I try to use method PlayFabClient.LinkGoogleAccount for my website, but I have an error redirect_uri_mismatch because PlayFab use own redirect_uri https://oauth.playfab.com/oauth2/google when called the google oauth api. But on my webpage I can't use this redirect URI, because I can't control webpage with URL different than my own.

So, my question is "How to use LinkGoogleAccount" with web application correctly?

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.

vitalyarkhipov avatar image
vitalyarkhipov answered

I discovered that in these methods there is a parameter AccessToken, which is not described in the documentation. Thank you!

1 comment
10 |1200

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

JayZuo avatar image JayZuo ♦ commented ·

Yeah, you may try with AccessToken instead of ServerAuthCode like in Setting up PlayFab authentication using Google and HTML5. While using AccessToken, you will need to modify PlayFab's SDK like https://community.playfab.com/answers/40300/view.html . Although AccessToken is deprecated and not recommended, it should still be able to work.

0 Likes 0 ·
Gosen Gao avatar image
Gosen Gao answered
1 comment
10 |1200

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

vitalyarkhipov avatar image vitalyarkhipov commented ·

@Gosen Gao Thank you for your answer! As I understand this approach works with the method LoginWithGoogle but I need to LinkGoogleAccount. When I try to specify access_token instead of auth_code in the method LinkGoogleAccount I have an error 'Google API error code: invalid_grant details: Malformed auth code.'. So I suppose this method wait an exactly auth code? Could you explain me? Thank you.

0 Likes 0 ·

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.