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

Method checkEmailAddressAuthorization

internal/api/mail.go:731–746  ·  view source on GitHub ↗
(email string)

Source from the content-addressed store, hash-verified

729var emailLabelPattern = regexp.MustCompile("[+][^@]+@")
730
731func (a *API) checkEmailAddressAuthorization(email string) bool {
732 if len(a.config.External.Email.AuthorizedAddresses) > 0 {
733 // allow labelled emails when authorization rules are in place
734 normalized := emailLabelPattern.ReplaceAllString(email, "@")
735
736 for _, authorizedAddress := range a.config.External.Email.AuthorizedAddresses {
737 if strings.EqualFold(normalized, authorizedAddress) {
738 return true
739 }
740 }
741
742 return false
743 }
744
745 return true
746}
747
748type sendEmailParams struct {
749 emailActionType string

Callers 1

sendEmailMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected