Registered without email confirmation
When a user creates an account, it is created without an email confirmation, even if email confirmation is turned on in the dashboard. Im using the default SMTP service. Any ideas?
19 Replies
How are you creating the account?
const { data: userData, error: userError } =
await supabase.auth.admin.createUser({
email,
password,
email_confirm: true,
});
Im using the service key to create the client, should I use the anon key instead?
Checked the docs I am supposed to use the service key. What am i dont wrong?
Try email_confirm:false
I believe true marks the address as confirmed versus sends out a mail to confirm it.
lol thats a bit counterintuitive but will try
OK now its not automatically confirmed but Im not receiving the confirmation email
Check the auth logs for error.
Using the built in SMTP even for debugging is not a great idea with 3 emails per hour (even with error not sending) and higher rate of spam filters blocking.
OK. No relevant errors in auth log and not in Spam. But Ill try with my own SMTP
No luck with Google SMTP either
Have you done any auth hooks (like for email)?
No known issues with this. And if you are not getting confirmed automatically now seems like you are sending or should see an error.
Anything in the Auth logs at all for the user creation?
Nope. Last log message says "audit_event"
Actually: /admin/users | request completed
The outgoing email is not in my SMTP logs so I assume its not being sent properly
Any ideas on how to debug this?
Not without errors.
I just tried the dashboard though and it did not send either.
Check in auth.users and see if there is even a confirmation token in the auth.users table. I would expect there to be one for the email to send.
I've asked another mod to try it and see if they see same thing.
You are in my dashboard??
nope no confirmation_token nor confirmation_sent_at
In the dashboard 'Confirm email' should be set to ON right?
No. I have no access to your instance. In my dashboards.
You want it off so it sends email.
Ah let me check that
Nope thats not it either
fwiw I was talking about the dashboard toggle, where it says "Confirm email
Users will need to confirm their email address before signing in for the first time". This seems really counterintuitive if it needs to be off to send the confirmation. In any case, neither setting worked for me
Let me know if you find out anything more about this issue
Another mod confirms broken. I have bumped it to Supabase.
Any update on this?
Nope. An auth engineer got our info with 4 instances failing that day.
What is odd is no one else is reporting it...
But 2 mods confirmed both with custom and built in SMTP on 4 instances.
Any updates?
Sadly nothing and oddly no other reports but yours and the two mods confirming it. I've not retested to see if there. Must be most don't use the send email to confirm option.
Seems very odd unless people arent using the email auth at all
Lots use email auth. Very few would use admin.createUser. They would just use .signUp().
The issue is not with confirming emails, but with the admin call seeing the flag.