Ah I mean that I want my email auth to be "invite ...
# help
n
Ah I mean that I want my email auth to be "invite only"
s
You can use the
.inviteUserByEmail
function for this https://supabase.com/docs/reference/javascript/auth-api-inviteuserbyemail
I have an example project here using it https://github.com/silentworks/waiting-list
a
@User this is not possible with Dart?
s
n
@User thanks! It's not clear to me looking at this how/if you're preventing uninvited users from creating an account
s
Inside of your dashboard disable signup under the Authentication/Settings, then use only invite emails to get users onboard
n
Ahh, I didn't realize I could disable email sign up but still use email auth, nice!
Is there a way to use a human-readable token to verify their invite instead of the long token embeded in the invite URL? This is for a mobile app, so using a link is not ideal since the user may not be opening the email on their phone.
I don't need Supabase to send the email, all I need is something like a column on users with an invite token (e.g. "423123") that the user has to provide when they set their password
s
At that point you would have to create your own invite system and create the users from the server side using
.createUser
method. https://supabase.com/docs/reference/javascript/auth-api-createuser
n
got it, thanks!