Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: user display names #116

Closed
Tracked by #60
iuioiua opened this issue Apr 23, 2023 · 2 comments · Fixed by #144
Closed
Tracked by #60

proposal: user display names #116

iuioiua opened this issue Apr 23, 2023 · 2 comments · Fixed by #144
Labels
enhancement New feature or request

Comments

@iuioiua
Copy link
Collaborator

iuioiua commented Apr 23, 2023

This can be a unique username or a non-unique display name for each user. It's worth ignoring what Hacker News or Product Hunt does here and instead asking which is better.

We should use a new table if it's to be a unique username. If it's to be a non-unique display name, it might be better to come from the user_metadata object.

I'd like to hear some thoughts.

CC @lambtron and @thorwebdev

@iuioiua iuioiua mentioned this issue Apr 23, 2023
30 tasks
@thorwebdev
Copy link
Contributor

Yah, storing a display name in user_metadata works. Just make sure you restrict the length to not blow up the cookie too much.

For unique usernames, I'd recommend creating a users table on the public schema. You can add a trigger to the auth.users table to automatically sync the Auth users to the public.users table. See an example here: https://github.com/vercel/nextjs-subscription-payments/blob/main/schema.sql#L19-L32

@iuioiua
Copy link
Collaborator Author

iuioiua commented May 1, 2023

We'll go ahead with a non-unique display name for each user.

@iuioiua iuioiua added the enhancement New feature or request label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants