question

doronhn avatar image
doronhn asked

i am kinda lost with create login mechanism

Hey,

i am kinda lost with create login mechanism.

in my "Main Scene" i have 3 buttons:

1. play - without login

2. login with Facebook

3. login with Google \ Game services

- After the user select one option and after they authenticate i will send the data to PlayFab and store what i need there.

- When the user will open the game again, i will check what if the last "sign up" method he choose = Facebook \ Google. then authenticate him and move he straight to the "World Select" scene.

- If he choose play without login, move him to my "Main Scene"

Questions:

1. i follow the Youtube guide and i can authenticate to Facebook \ google (after button click).

2. i dont know how to "store" the data in PlayFab.

3. i do i check what is the user last login? or if the user already authenticated?

thanks!

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

I'm not sure what's the data you want to store in PlayFab. For data that applies to an individual player, you can use Player Data. Besides, Entities is also a good option, which is is a replacement for the previous separation of "User/Player", "Character", "Shared Groups" and similar concepts that exist in the Pre-2018 APIs.

For your third question, you can store user's last login type locally. For example, in Unity, use PlayerPrefs to store authentication types (None, Facebook, Google). And every time, when user open the game again, you can retrieve this stored value to determine whether to perform authentication. There is no need to know if the user already authenticated, you can always do the authentication when your game opens.

For more details, you can refer to PlayFabAuthentication sample, especially PlayFabAuthService.

2 comments
10 |1200

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

doronhn avatar image doronhn commented ·

thanks for the reply, i did check those file (they are in the video).

i cant understand whats the all process of the login and why.

do you have other samples?

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ doronhn commented ·

I do not have any other sample, but I'd think this document might help 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.