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

Method sendPhoneChangedNotification

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

Source from the content-addressed store, hash-verified

621}
622
623func (a *API) sendPhoneChangedNotification(r *http.Request, tx *storage.Connection, u *models.User, oldPhone string) error {
624 err := a.sendEmail(r, tx, u, sendEmailParams{
625 emailActionType: mail.PhoneChangedNotification,
626 oldPhone: oldPhone,
627 })
628 if err != nil {
629 if errors.Is(err, EmailRateLimitExceeded) {
630 return apierrors.NewTooManyRequestsError(apierrors.ErrorCodeOverEmailSendRateLimit, "%s", EmailRateLimitExceeded.Error())
631 } else if herr, ok := err.(*HTTPError); ok {
632 return herr
633 }
634 return apierrors.NewInternalServerError("Error sending phone changed notification email").WithInternalError(err)
635 }
636
637 return nil
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{

Callers 2

smsVerifyMethod · 0.95

Calls 6

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