haxball / haxball-issues

115 stars 43 forks source link

Player.auth is null #1465

Open diegopaiva1 opened 3 years ago

diegopaiva1 commented 3 years ago

So, according to the docs, the auth property from the PlayerObject "can be null if the ID validation fails". From my experience, I rarely see someone's auth being null. However, there is this player in my room in which his auth is always null, thus he is unable to register and use commands that rely on that property. Why does this happen? I've told him to change keys, but whenever he enters the room, the auth is always null.

ghost commented 3 years ago

nullAuth

diegopaiva1 commented 3 years ago

Don't really get it. Could you explain it?

ghost commented 3 years ago

I've changed a value of a key called "player_auth_key" from localStorage which defines player's auth using localStorage.setItem method. Example:

localStorage.setItem("player_auth_key","idkey.3462362323652365.23562365.3265.23.65346236326") 
diegopaiva1 commented 3 years ago

I've changed a value of a key called "player_auth_key" from localStorage which defines player's auth using localStorage.setItem method. Example:

localStorage.setItem("player_auth_key","idkey.3462362323652365.23562365.3265.23.65346236326") 

I see... But how is this related to the auth always being null? My point is that whenever the person enter the room, their public auth key is null. I do not know what this particular person did in order to trigger such behavior.

thenorthstar commented 3 years ago

It's not that much hard to understand. They use localStorage to change their auth and joining to the rooms so. I also try this even rarely for testing rooms' filters. Anyway, if you don't want; just write a couple rows of code and blacklist it.

diegopaiva1 commented 3 years ago

It's not that much hard to understand. They use localStorage to change their auth and joining to the rooms so. I also try this even rarely for testing rooms' filters. Anyway, if you don't want; just write a couple rows of code and blacklist it.

Ok, I see... I did not realize the authentication is made by means of the local storage.

thenorthstar commented 3 years ago

It's not that much hard to understand. They use localStorage to change their auth and joining to the rooms so. I also try this even rarely for testing rooms' filters. Anyway, if you don't want; just write a couple rows of code and blacklist it.

Ok, I see... I did not realize the authentication is made by means of the local storage.

@diegopaiva1 LocalStorage is a way for changing the auth. That is, not the only way. You can also use https://haxball.com/playerauth to change your auth.

diegopaiva1 commented 3 years ago

It's not that much hard to understand. They use localStorage to change their auth and joining to the rooms so. I also try this even rarely for testing rooms' filters. Anyway, if you don't want; just write a couple rows of code and blacklist it.

Ok, I see... I did not realize the authentication is made by means of the local storage.

@diegopaiva1 LocalStorage is a way for changing the auth. That is, not the only way. You can also use https://haxball.com/playerauth to change your auth.

Sorry, but now I am kinda confused. I did actually sent him this link as an attempt to ensure he can play in my rooms.

I've told him to change keys, but whenever he enters the room, the auth is always null.

Still, auth remains nulls. What can I do for him?

thenorthstar commented 3 years ago

It's not that much hard to understand. They use localStorage to change their auth and joining to the rooms so. I also try this even rarely for testing rooms' filters. Anyway, if you don't want; just write a couple rows of code and blacklist it.

Ok, I see... I did not realize the authentication is made by means of the local storage.

@diegopaiva1 LocalStorage is a way for changing the auth. That is, not the only way. You can also use https://haxball.com/playerauth to change your auth.

Sorry, but now I am kinda confused. I did actually sent him this link as an attempt to ensure he can play in my rooms.

I've told him to change keys, but whenever he enters the room, the auth is always null.

Still, auth remains nulls. What can I do for him?

@diegopaiva1 He must use the window on which he have changed his auth or refresh the page (if don't use the auth page).