Is it advisable to store username in user Metadata?
06/03/2022, 3:58 AM
The user metadata is just a key value store per user.
So you can store anything in there, as long as you want to query it using the user id
For the case of username, if you want to check if a username is unique, then you will have to loop through all the users, fetch their metadata and then check their usernames. This is as opposed to storing the username yourself and making that a primary key
So I wouldn’t advise to store the username in user metadata
Unless you don’t care about it being unique. Then it’s fine