MCPcopy Index your code
hub / github.com/supabase/auth / sendIdentityUnlinkedNotification

Method sendIdentityUnlinkedNotification

internal/api/mail.go:657–672  ·  view source on GitHub ↗
(r *http.Request, tx *storage.Connection, u *models.User, provider string)

Source from the content-addressed store, hash-verified

655}
656
657func (a *API) sendIdentityUnlinkedNotification(r *http.Request, tx *storage.Connection, u *models.User, provider string) error {
658 err := a.sendEmail(r, tx, u, sendEmailParams{
659 emailActionType: mail.IdentityUnlinkedNotification,
660 provider: provider,
661 })
662 if err != nil {
663 if errors.Is(err, EmailRateLimitExceeded) {
664 return apierrors.NewTooManyRequestsError(apierrors.ErrorCodeOverEmailSendRateLimit, "%s", EmailRateLimitExceeded.Error())
665 } else if herr, ok := err.(*HTTPError); ok {
666 return herr
667 }
668 return apierrors.NewInternalServerError("Error sending identity unlinked notification email").WithInternalError(err)
669 }
670
671 return nil
672}
673
674func (a *API) sendMFAFactorEnrolledNotification(r *http.Request, tx *storage.Connection, u *models.User, factorType string) error {
675 err := a.sendEmail(r, tx, u, sendEmailParams{

Calls 6

sendEmailMethod · 0.95
NewTooManyRequestsErrorFunction · 0.92
NewInternalServerErrorFunction · 0.92
IsMethod · 0.45
ErrorMethod · 0.45
WithInternalErrorMethod · 0.45