So i am building a social application in which i want to give users a unique nickname.
In my app i have configured Login with, FB, Google and other PasswordLess connections.
Once a user comes after successful login. I want to check or assign them a unique nickname.
How i want to do this :
- User Logs In
- Fetch User Profile
- Check for custom nickname property.
- If not found, ask user to suggest a one.
- From management api check if this custom nickname is not assigned to anyone else.
- If not assigned, assign it to the current user
- Else ask user to choose another name.
What i have read so far, is that i can use app_metadata for such properties.
Some desired behaviour around this custom unique property
- It should be searchable. Pointing back towards the user.
- Insert should give error if unique constraint fails
- Should be readable from user profile fetch call.
Please suggest a best way to do that. I do not want to build a custom db just for this purpose before my management api add that unique properties to user profile.
Any help will be appreciated