question

drew avatar image
drew asked

Add Username Password does not generate playstream event?

hi,

I am following the PlayFab Auth Sample on GitHub and the associated YouTube videos (https://github.com/PlayFab/PlayFab-Samples/blob/master/VideoTutorialSamples/PlayFabAuthentication/Assets/PlayFabUI/Demo/Scripts/PlayFabAuthService.cs)

I can't for the life of me figure out why calling AddUsernamePassword does not generate a playstream event.

The sequencing looks like this:

1) SilentAuth using LoginWithCustomID --> Generates ae ton of events

2) AddUsernamePassword --> Generates NO events, even though it responded with a 200OK

3) LinkCustomID (RememberMe GUID) --> Generates 'player linked account' event

Why doesn't calling AddUsernamePassword generate a Player Linked Account event? Or any event at all? Am I completely missing something here?

Second question, why does the "UnlinkSilentAuth();" method create an account every time? This doesn't seem like the proper workflow to 'log out'? Shouldn't we send CreateAccount to value false for a proper logout button?

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.

1 Answer

·
Rick Chen avatar image
Rick Chen answered

AddUsernamePassword API won't generate any event, this is by design. You can use WriteEvents API to generate a custom event after calling AddUsernamePassword API. Please refer to this similar case: https://community.playfab.com/questions/47014/is-it-possible-to-trigger-a-rule-after-the-player.html

The Auth Sample on Github is just sample code demonstrating how Auth APIs are used in Unity. You may feel free to change the code to suit your needs. PlayFab is stateless service, there is no logout API. And strictly speaking, the "UnlinkSilentAuth();" method doesn't equal to "log out", it simply disconnects the device id with the account so that the device id will not be able to login to that account, until it is linked to that account again.

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.