Is it advisable to store username in user Metadata?
r
rp
06/03/2022, 3:58 AM
Hey @dhatGuy
rp
06/03/2022, 3:58 AM
The user metadata is just a key value store per user.
rp
06/03/2022, 3:59 AM
So you can store anything in there, as long as you want to query it using the user id
rp
06/03/2022, 4:00 AM
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
rp
06/03/2022, 4:00 AM
So I wouldn’t advise to store the username in user metadata
rp
06/03/2022, 4:00 AM
Unless you don’t care about it being unique. Then it’s fine