How do you enable email/password authentication wh...
# help
g
How do you enable email/password authentication when self-hosting Supabase? I'm receiving the following error when using
supabase.auth.signIn
with my current instance:
POST http://localhost:3100/auth/v1/token?grant_type=password net::ERR_FAILED
n
Hello @Gabriel_! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
s
n
Gabriel_ (2022-06-02)
g
Thank you for the answer @silentworks, but I have already enabled the
ENABLE_EMAIL_SIGNUP
environment variable.
s
Are you running this locally or on a hosted server?
g
I'm currently running it locally
s
My only thought is that you don't have something configured correctly. Did you generate your
ANON_KEY
and
SERVICE_ROLE_KEY
then add it to the
.env
config file?
g
Yes, I added them to the
.env
file. I will try to redo the setup on another server and see if that works.
I was able to fix the HTTP error on my new deployment, but I'm still getting an error about email confirmation even though I set
ENABLE_EMAIL_AUTOCONFIRM=true
Copy code
{ message: 'Error sending confirmation mail', status: 500 }
Error sending confirmation mail
Any ideas here? Thank you for the help!
s
Did you setup your SMTP server? or if this is just for local development you can use inbucket that is part of the docker development setup. You would call your docker compose like
Copy code
sh
docker-compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml up
g
I thought that I did not need to configure a SMTP server when the
ENABLE_EMAIL_AUTOCONFIRM
was set to true. After adding a SMTP server the deployment is working. The only thing that doesn't seem to work now is the autoconfirmation of the email (Still getting
Waiting for verification
in the UI) even though the
ENABLE_EMAIL_AUTOCONFIRM
is set.