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

Method sendIdentityLinkedNotification

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

Source from the content-addressed store, hash-verified

638}
639
640func (a *API) sendIdentityLinkedNotification(r *http.Request, tx *storage.Connection, u *models.User, provider string) error {
641 err := a.sendEmail(r, tx, u, sendEmailParams{
642 emailActionType: mail.IdentityLinkedNotification,
643 provider: provider,
644 })
645 if err != nil {
646 if errors.Is(err, EmailRateLimitExceeded) {
647 return apierrors.NewTooManyRequestsError(apierrors.ErrorCodeOverEmailSendRateLimit, "%s", EmailRateLimitExceeded.Error())
648 } else if herr, ok := err.(*HTTPError); ok {
649 return herr
650 }
651 return apierrors.NewInternalServerError("Error sending identity linked notification email").WithInternalError(err)
652 }
653
654 return nil
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{

Callers 3

linkIdentityToUserMethod · 0.95
smsVerifyMethod · 0.95

Calls 6

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