createUser doesn't send verification email?

When I use signUp from the browser, Supabase sends a verification email. When using createUser, Supabase doesn't seem to send a verification email, but it is still not possible to log in, as the email hasn't been verified. Is there some way I can have the verification email sent?
8 Replies
Matt
Matt4y ago
Having the same issue. I've tried searching the docs, github issues and here. I've sent an email to support to see if they can help. Did you manage to find a solution?
// Create a user in Supabase for authentication to the site
const { user, error: userError } =
await getSupabaseAdmin().auth.api.createUser({
email,
password,
user_metadata: {
swell_id: swellAccount.id,
},
});
// Create a user in Supabase for authentication to the site
const { user, error: userError } =
await getSupabaseAdmin().auth.api.createUser({
email,
password,
user_metadata: {
swell_id: swellAccount.id,
},
});
This is the code I'm using
Christian Bertram
No, I haven't found any solution. Hopefully support can help. But I guess it's a bug (or an unhelpful design choice)
Matt
Matt4y ago
Support got back to me and said they recommend using your own email servers for hobby plans
Christian Bertram
Huh. Did they say anything else?
tonyhart
tonyhart4y ago
Yeah thats the lame part, I prefer magic link and promote role user to custom verified for now
Christian Bertram
I found the solution in my case. Just use signUp instead of createUser... I went for createUser because I wanted to know the users.id before the email had been confirmed. But signUp also creates a users row before confirmation So to me it seems that createUser and signUp would have exactly the same effect, if createUser were to send out confirmation emails. A bit weird, but would explain the situation. Of course createUser has an option to bypass confirmation, so it could be useful in that way
Matt
Matt4y ago
I'll give that a go.
Christian Bertram
Please tell me if that's not a solution for you. I think I'll send a pull request for hinting this in the docs

Did you find this page helpful?