Users
User roles
There is an users table in the database. Users can have the following roles:
- contributor: Can add pins and suggest edits. Can self-register.
- moderator: Can accept new pins or edits. Invited by admins.
- admin: Can manage moderators or block users.
Contributors
Contributors register using Supabase OTP (One-Time Password)
New contributor
- User opens the map
- Clicks the “Add” button
- A form appears asking for email
- On submit
- The form switches to a code input
- An email is sent with the code
- The user goes to their email and enters the code in the form
- That email is registered in the users db with role “contributor”. A token should be stored so they do not have to repeat the process.
Existing contributor
- Same as “New contributor”
- At step 6, instead of adding a new user, refresh the token