S
Supabase•2w ago
Fabrizio

Any transactional emails are being delivered

My problems seems to be a little bit odd when sending transactional emails: - database less than 2 weeks old - redis and stripe wrappers enabled - few tables with rls, functions and triggers (all possibly working nicely but can test it out (refactored names and stuff from old database)) - Built application using exclusively Github oAuth app (no email/password login) - user can login successfully in the application - confirmation email is never sent (to verify the email address) - built an exclusive route to test what is going on, logs says emails rate limit is over (despite the fact never received ANY email ever) - created a fresh gmail account just to try sending some confirmation emails
20 Replies
Fabrizio
FabrizioOP•5d ago
- set the 16 char password and everything else and set this account on supabase custom smtp - no luck sending any email... a n y - created a resend account and used the resend integration to set it up correctly - still any transactional email is sent, but I can see the email was sent in Resend dashboard - built a simple route to send a simple email, bypassing all authentication and everything, just to send a simple email just to check if everything is working and, email arrived in inbox - Logs says I'm still locked due email rate limiting (even having the Resend integration enabled (hopefully)) - Built several routes to test email sending, but emails are never sent, even deleting the user from stripe and supabase and revoking its tokens from github and creating a new user from scratch - there is NO LOGS about email sending attempts in Supabase or any about rate limiting, only from /resend route - shouldn't have a E-mail topic in Logs section of supabase dashboard? So we could troubleshoot email sending issues more effectively? - I created an edge function only to send verification emails using Resend - One thing I noticed is, if Email signup is disabled in Supabase Auth settings (but the confirmation email is enabled), the email verification is not sent, even if I have a custom route to send the verification email using Resend had to break the message due 2k limit it seems to be the same issue from here - https://discord.com/channels/839993398554656828/1395716381236006912 someone?
garyaustin
garyaustin•5d ago
Does invite work from the dashboard authentication section? Are you using the default email templates? Did you up the rate limit setting? I don't think adding a custom SMTP does that automatically, but it might. The Auth log should show your auth calls involved with email. Any errors in the details?
Fabrizio
FabrizioOP•5d ago
1. any email is being delivered after auth, so no. Never reached to the invite point so far, but most likely it wont work 2. yes, nothing different. i tried to used supabase itself to send the emails, changed to resend and still nothing 3. yes, raised to 200 but still nothing 4. no, nothing shows up in api gateway or auth related to email things
garyaustin
garyaustin•5d ago
Please try the dashboard UI authentication tab default SMTP if possible and create a user using send invitation from the dashboard.. This should eliminate you doing anything (except an auth email hook which you should ensure you are not doing).
garyaustin
garyaustin•5d ago
Also what API auth calls are you exactly making that expect email? Do you have confirm email set (if you have not tested invite or password reset)?
No description
Fabrizio
FabrizioOP•5d ago
done, email received from invitation but when user logs in using my platform, the email is not delivered, even using the code straigth from supabase docs yes, i only disable login via email, because the platform is strictly using github ... one thing I noticed is, if I disable login via email, the invitation from dashboard ui works, but from the platform, doesn't =/
garyaustin
garyaustin•5d ago
What method are you using signup? You said any transactional email in title. I'm thinking you have a more specific issue with an auth call. I don't understand what you are doing. If the platform is only github then why are you doing email signup/signin? Also to use auth email signup you will need to have signups enable. How are you disabling login via email?
Fabrizio
FabrizioOP•5d ago
What method are you using signup? - github only, no other auth You said any transactional email in title. I'm thinking you have a more specific issue with an auth call. - after user log into the application for the first time, this user should receive a confirmation email, right? so, this confirmation email is never received. I now managed to get the first email but using edge function. without edge function, no deal If the platform is only github then why are you doing email signup/signin?- no, email signin is disabled BUT if I left this disabled I DO NOT receive the confirmation email
Also to use auth email signup you will need to have signups enable. How are you disabling login via email? - via supabase dashboard
No description
garyaustin
garyaustin•5d ago
There is no confirmation email for OAuth. There are at least two options in dashboard to limit emails or signups.
Fabrizio
FabrizioOP•4d ago
yeaaahh... but...
No description
Fabrizio
FabrizioOP•4d ago
There is no confirmation email for OAuth. is this in any docs? sorry but i think i skipped this part. and how exactly should i verify an email in my application is the same used in my payment gateway? just to know... for example user buy a subscription on stripe > user logs in my application using another email from their github account (not necessarily both are the same) how to make this ""link""?? using auth.verifyOtp does not work with signup action, so how would I make this? the way i found was to create a table to make this, the stripe id === user id on my application and then the user is allowed and the Manual LInking is already enabled and still, no deal and the .auth.linkIdentity only works with an existing user, not a new one. im already using it but
const { data, error } = await this.supabase.auth.linkIdentity({
provider: provider as any,
options: {
// Use current origin to avoid redirect issues
redirectTo: `${window.location.origin}/auth/callback`,
scopes: provider === 'github' ? 'read:user user:email' : undefined,
}
});
const { data, error } = await this.supabase.auth.linkIdentity({
provider: provider as any,
options: {
// Use current origin to avoid redirect issues
redirectTo: `${window.location.origin}/auth/callback`,
scopes: provider === 'github' ? 'read:user user:email' : undefined,
}
});
garyaustin
garyaustin•4d ago
Supabase auth does not in general send email that you have successfully signed up. They send emails to Confirm your email address to complete your sign up (either with a link or code). In the case of OAuth there is no need for that. You are valid when the OAuth provider confirms you. I don't know much about linkIdentity, you whould probably as a new question.
Fabrizio
FabrizioOP•3d ago
imagine the following scenario - you buy my subscription using your personal email gary@austin.com on stripe - you have your github account with another email gary.austin@oldprovider.com right? you are both the exact same person... how would you link both accounts automatically? there should be a way to do that... i did creating a table with both emails and done... does supabase has something to help me in this case? what should i do then other than this table?
garyaustin
garyaustin•3d ago
Supabase does have linkIdentity to link two OAuth accounts with different email. https://supabase.com/docs/guides/auth/auth-identity-linking But as I said I don't know much about it.
Fabrizio
FabrizioOP•3d ago
yeah, but this would work only one way, you have an account using your gmail gary@gmail.com , you signed up using email/password way, and then, after a while, the website owners started to use google oauth, for example, thus making this identity linking... which it isn't my case... well, at least is what I got it from the first line in the first paragraph Supabase Auth automatically links identities with the same email address to a single user. ... what i need is two email scenario.
garyaustin
garyaustin•3d ago
That is the manual linking. There is the linkIdentity command to link two different emails from OAuth providers.
garyaustin
garyaustin•3d ago
No description
Fabrizio
FabrizioOP•3d ago
do you know where I could find some examples to this apart from only this single line? just to get a bettter grasp
garyaustin
garyaustin•3d ago
As I said I don't know much about it and I don't use it personally in my project. Ask a new question so other users can help or search the docs/web.
Fabrizio
FabrizioOP•3d ago
superb! Thanks 🙂

Did you find this page helpful?