unity-solutions icon indicating copy to clipboard operation
unity-solutions copied to clipboard

Hi, how can i change the user id?

Open MayckonJhonatas opened this issue 5 years ago • 9 comments

Screenshot_20191202-194621 How i can change this id in blue for something like the firebase authentication uid? (firebase leaderboard)

MayckonJhonatas avatar Dec 02 '19 22:12 MayckonJhonatas

Can you help me, please?

MayckonJhonatas avatar Dec 02 '19 22:12 MayckonJhonatas

Hello, when you call the LeaderboardController.AddScore(), use the firebase authentication UID, which you will need to get from the FirebaseAuth package.

dzlier-gcp avatar Dec 02 '19 22:12 dzlier-gcp

I did this but it's not working. Can you send me a example here? please.

MayckonJhonatas avatar Dec 04 '19 23:12 MayckonJhonatas

Could you paste your code snippet so that I can see what you did? Also please provide more information on how it isn't working. If you're seeing an error, what is the error? If it's just not adding the score, please say so as well.

dzlier-gcp avatar Dec 05 '19 00:12 dzlier-gcp

Could you paste your code snippet so that I can see what you did? Also please provide more information on how it isn't working. If you're seeing an error, what is the error? If it's just not adding the score, please say so as well.

Hi I am Facing The Same Problem , I have Correctly Setup Authentication using FirebaseGoogleAuth And after that i can successfully access the IDToken using(" FirebaseAuth.CurrentUser.UserId") now what i want is under the "all_scores" every entry that is created Is Named as the UserId Of that user so If my IDToken or User_ID is - ag447dnw9902dn820w22299 then when i upload my score then the entry that is created under the all_scores should be named as my user-id so the data structure would be like "{all_score} ->{ag447dnw9902dn820w22299}->{score,timestamp,user_id,username}" . But Currently When i pass the user id Then every Entry under The allscores is created with a random string value like HDWODnywunOL1, HDWODnywunOL2, HDWODnywunOL3, so how to fix this

Danteswap27 avatar May 10 '20 06:05 Danteswap27

Are you saying that when you call LeaderboardController.AddScore() you are providing that IDToken as the User ID, but that the entries created have a random key instead of using that IDToken?

dzlier-gcp avatar May 18 '20 17:05 dzlier-gcp

thank you for replying my problem is now solved

On Mon, May 18, 2020 at 10:54 PM Dane Zeke Liergaard < [email protected]> wrote:

Are you saying that when you call LeaderboardController.AddScore() you are providing that IDToken as the User ID, but that the entries created have a random key instead of using that IDToken?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FirebaseExtended/unity-solutions/issues/23#issuecomment-630325978, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJT5I4EGVYQWHS4WWFVLVI3RSFVL3ANCNFSM4JUMDO4A .

GameDevKaran avatar May 19 '20 13:05 GameDevKaran

Are you saying that when you call LeaderboardController.AddScore() you are providing that IDToken as the User ID, but that the entries created have a random key instead of using that IDToken?

Yes Thats the Problem.

Danteswap27 avatar May 30 '20 17:05 Danteswap27

What is the name of this site?

AGaliApp avatar Nov 04 '21 13:11 AGaliApp