TheGame
TheGame copied to clipboard
Figure out what to do on name change
What would you like to be added?
When user changes their username on their profile page player/username
, the url stays the same, although it should change according to the username change and if the player for example refreshes the page, we'll get a 404. It's technically not a bug, but we could improve the behaviour of this process.
We could navigate the user after the username change to a properly named url or to somehow patch the url without reloading the whole page (is this even possible?).
Why is this needed?
Due to unwanted behaviour on refreshing.
¿You are discussing refreshing copies of the profile page open in other browser windows?
The only way to prevent a 404 in that case is to save the username history and redirect.
That has the advantage of avoiding someone spoofing a user identity by claiming an abandoned name. It has the disadvantage of allowing someone to claim many usernames by simply repeatedly changing their name.
For privacy reasons, I prefer keeping it to one user one name and not preserving a history.
A more private alternative is to keep a list of allowed names and disallow their use. This is open a a griefing attack of disallowing lots of popular names. You can limit the number of username changes to mitigate that, but that adds a new complexity layer.
Another solution is to add text to the 404 explaining that if this used to be a profile, it has been changed.
I didn't think about the case with other browser windows (or tabs), but i see the problem now, yes.
Keeping a history seems like it could lead to some unwanted behaviour.
Your solution with adding explanation to 404 would make the most sense, imo. @Udit-takkar suggested to just change the route once the username change was confirmed. We could implement both?
Take into consideration that in the future we want users to have multiple addresses
#943 makes it so that a user's profile is resolvable both through their username and through their Ethereum address. When a user makes a change to their username, they are redirected to the ETH address URL.
No longer relevant, multiple ways of reaching a profile, plus there's a custom URL feature now. Closing