question

mattpdonnelly avatar image
mattpdonnelly asked

how can I use the players account detail and authenticate with that instead of making an new account

private void AuthenticateWithPlayFab() { LogMessage("Playfab authenticating using Custom Id..."); PlayFabClientAPI.LoginWithCustomID(new PlayFab.ClientModels.LoginWithCustomIDRequest() { CreateAccount = true, CustomId = PlayFabSettings.DeviceUniqueIdentifier }, RequestPhotonToken, OnPlayFabError); }

how can I use the players account detail and authenticate with that instead of making an new account

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

Using that login call, if the Custom ID you pass in is one that was already used to create an account, and that account hasn't been deleted or unlinked from that Custom ID, that call will always log the player into the pre-existing account.

If you're having an issue with login, can you describe the specifics, so that we can help you work out why you're seeing what you are?

6 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.

mattpdonnelly avatar image mattpdonnelly commented ·
capture.png

So i can't use the log in details of the user already because the example i get to different user id's is this right or not?

0 Likes 0 ·
capture.png (34.6 KiB)
brendan avatar image brendan mattpdonnelly commented ·

The icons in that image tell you what was used to create the accounts. So, one was created with a Custom ID login, and the other was created with the RegisterPlayFabUser. If you want them to be together in one account, you would either use AddUsernamePassword on an account created with Custom ID or else LinkCustomId on the account created with RegisterPlayFabUser.

0 Likes 0 ·
mattpdonnelly avatar image mattpdonnelly commented ·

ok thank you the next part is incorporating photon with play fab so now I can use the photon match making and it should trigger the webhooks now like room created and if a user leaves.

0 Likes 0 ·
brendan avatar image brendan mattpdonnelly commented ·

Yes, once you have Photon correctly configured and authenticate users, the standard Photon webhooks will be calls for those activities. Have a look at this tutorial for more info: https://api.playfab.com/docs/tutorials/landing-tournaments/photon-unity

0 Likes 0 ·
mattpdonnelly avatar image mattpdonnelly commented ·

Is Photon PUN compadable with playfab

0 Likes 0 ·
brendan avatar image brendan mattpdonnelly commented ·

Yes, PUN is effectively the same as Photon Realtime, in terms of setup and usage - it works fine with our service.

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.