Auth Email with SMTP provider: Using SendGrid Dynamic Template #28689
Replies: 2 comments
-
If you can't add the info for your template ID's hardcoded in the Supabase template then you might look at this new feature announced this week. https://supabase.com/docs/guides/auth/auth-hooks/send-email-hook |
Beta Was this translation helpful? Give feedback.
-
That's exactly what I did, and it technically works, but the problem is that I'm missing the usual parameters that I have with the built-in template, especially What do you mean with "add the info for your template ID's hardcoded in the Supabase template"? I can just copy and paste the HTML code of the template, afaik. |
Beta Was this translation helpful? Give feedback.
-
Howdy!
We are migrating to Supabase from our internal Auth system, built-in into our Backend stack (Node.js + Express.js + Loopback.js v3).
I have been able to properly setup SendGrid as a third-party SMTP provider, and it works: if I request a password reset or I invite a new user, I correctly receive the transactional email from my SendGrid custom domain.
Only problem: we use Dynamic Templates on SendGrid, created with its editor, and we'd like to keep using them without copying and pasting the SG template HTML into Supabase. Using SG API, it is possible to specify which template to use, and which parameters to pass through (more info here: https://www.twilio.com/docs/sendgrid/ui/sending-email/how-to-send-an-email-with-dynamic-templates).
Is it possible to add in Supabase Auth -> SMTP settings, or in the Email Templates settings, the chance to set up templates id for each Auth transactional email?
I already looked over a possible workaround: using Edge Functions + Auth Hooks. It works, but for some reason I'm not able to receive the correct parameters like the ones I have in the default
confirmationUrl
of the built-in emails. I'm only able to get the token hash (also confirmed by the doc), which is not enough since I'd like to have the token expiration information too, something that I have in theconfirmationUrl
parameter.Having the chance to set the templateId for our SendGrid integration would be really awesome.
Beta Was this translation helpful? Give feedback.
All reactions