Hi all, can anyone clarify to me if with supabase ...
# help
r
Hi all, can anyone clarify to me if with supabase there is a way to generate mail action links through the API in order to have total control over the templates sent to customers?
s
Yes you can generate your own email links and send them out with your own system. This must be done using the service key so can only be done server side https://supabase.com/docs/reference/javascript/auth-api-generatelink
r
Thanks!!!!
k
@User what if we want to verify the email address ourselves? As far as I could test, when I disable "Email confirmation" in my project's settings, the
email_confirmed_at
is set on the
auth.users
is created. So opening the
generateLink
url fails with a
{ message: 'User not allowed', status: 401 }
is there anyway around this?
s
@User a work around would be to create a trigger function that would reset the value of the
email_confirmed_at
value to
null
in the
auth.users
table after the user is created, then now you should be able to use the generateLink.
k
cool! I'll try that! thanks a lot