supabase / auth

A JWT based API for managing users and issuing JWT tokens
https://supabase.com/docs/guides/auth
MIT License
1.43k stars 348 forks source link

Auth webhook with link #88

Closed drgarlic closed 2 years ago

drgarlic commented 3 years ago

Hi !

Would it be possible to have add a webhook on the auth setting so that we could send the email ourselves with the link passed as a parameter ?

Currently auth are different from my other emails because they're cannot be sent to same way my other emails are. I'm sure that I'm not the only one in this situation. Also, they're more frequently sent to spam than my normal ones because of the link and the smtp connection.

kiwicopple commented 3 years ago

👍 transferring to GoTrue

awalias commented 3 years ago

hey @gawlk you can use custom SMTP server on the supabase dashboard and also set the template (any html/css) from there (both in Auth > Settings)

image image

the reasons I think webhook might work better is:

drgarlic commented 3 years ago

I completely agree with the pros of webhooks. I know about the smtp but it's really not good enough for me, it goes straight to spam every time because of the bounce supabase > mail service > client and because of the weird link. Webhooks would fix the former !

kangmingtay commented 3 years ago

Hey @gawlk, we just merged a PR that's gonna help with this here. Basically, you can now generate the email action links via the /admin/generate_link endpoint, and send the link via your own dedicated email service provider (e.g. Sendgrid, etc...). We're testing it in our staging environment now and will release it soon! Hope this helps!