feat: restrict signup invite links to a specific email domain

This commit is contained in:
ItalyPaleAle
2026-07-16 06:44:59 -07:00
parent 525946e94e
commit fdfaac8a35
25 changed files with 442 additions and 35 deletions
+10
View File
@@ -277,3 +277,13 @@ type InvalidEmailVerificationTokenError struct{}
func (e InvalidEmailVerificationTokenError) Error() string { return "Invalid email verification token" }
func (e InvalidEmailVerificationTokenError) HttpStatusCode() int { return http.StatusBadRequest }
type EmailDomainNotAllowedError struct {
Domain string
}
func (e EmailDomainNotAllowedError) Error() string {
return fmt.Sprintf("The email address must use the domain @%s", e.Domain)
}
func (e EmailDomainNotAllowedError) HttpStatusCode() int { return http.StatusBadRequest }