How to get email confirmation to work on Supabase local development environment

I working on authentication on a Supabase and SvelteKit project. I have setup the authentication client and Signup works fine, but the email confirmation is causing problems. I am running a local development environment using Supabase CLI and Docker Desktop, and the confirmation email is sent to the InBucket link at http://localhost:54324. But When I click on the link I get a 500 internal server error.

I have setup the email is the config.toml file in the Supabase directory.

auth.email.template.confirmation]
subject = "Confirm your sign up email"
content_path = "./supabase/templates/confirmSignup.html"

[auth.email.template.magic_link]
subject = "Your magic link"
content_path = "./supabase/templates/magicLink.html"

Here is the confirmation link being used in the confirmation template: http://localhost:5173/auth/confirm?token_hash=TOKEN_HASH_HERE&type=email

I am fairly certain I have done these correctly, and I don't know what I am missing.

Upvotes: 0

Views: 2142

Answers (1)

Monica
Monica

Reputation: 244

Checking your code, I think you are on the right track. However, I think it's possible that the changes you made to the config.toml file are not being picked up. Can you try to restart your local development env after making these changes and see if that helps?

Upvotes: 0

Related Questions