Dear support team,
I am trying to do the "reset password" as this discussion.
I am sorry for opening this question because I spent a lot of time for implementing and searching.
I am following this process as Sarah Zhang advices.
1. Write a custom CloudScript function -- "storeToken", to save the Token to the player's internal data.
2. Create a PlayFab Rule, such as “StoreResettingToken”, choose the Event Type as “com.playfab.auth_token_validated”, set the action as "Execute CloudScript", choose function "storeToken".
3. Administrative tools call GetUserInternalData to check the stored info.
But I don't understand some steps as below.
1. I written the CloudScript function -- "storeToken", but I believe this is not correct. So could you help me to fix it to store the token to the player's internal data?
handlers.storeToken = function (args, context) { var playerStatUpdatedEvent = context.playStreamEvent; var request = { PlayFabId: currentPlayerId, Data: { "Token": playerStatUpdatedEvent.StatisticValue.toString() } }; var playerInternalData = server.UpdateUserInternalData(request); return { profile: context.playerProfile }; }
2. I created the PlayFab Rule as below. But will we need to set the Arguments (JSON) for storeToken() function to store the token to the player's internal data? If we need it then how to put the Arguments?
3. To reset the password, we have to call the PlayFab Admin API - Reset Password:
But I don't want to make a custom server then how to reset the password in Unity client when users clicked the email verification and put the new password? And what is Administrative tools using in here?
I am grateful so much for your help.