feat: add ability to force email verification (#1837)

This commit is contained in:
Elias Schneider
2026-10-13 22:04:33 +02:00
committed by GitHub
parent eb8ea6bed2
commit 0ffeb170cf
81 changed files with 2310 additions and 263 deletions
@@ -308,3 +308,11 @@ func OidcPARRequired() *Error {
func InvalidEmailVerificationToken() *Error {
return New(CodeEmailVerificationTokenInvalid, http.StatusBadRequest, "Email verification token is invalid")
}
func EmailVerificationRequired() *Error {
return New(CodeEmailVerificationRequired, http.StatusForbidden, "You must verify your email address before you can access this service.")
}
func EmailChangeNotStarted(cause error) *Error {
return Wrap(cause, CodeEmailChangeNotStarted, http.StatusInternalServerError, "Your other changes were saved, but the email to confirm your new email address could not be sent")
}
+2
View File
@@ -35,6 +35,8 @@ const (
CodeDeviceLoginExpired Code = "device_login_expired"
CodeReauthenticationRequired Code = "reauthentication_required"
CodeEmailVerificationTokenInvalid Code = "invalid_email_verification_token"
CodeEmailVerificationRequired Code = "email_verification_required"
CodeEmailChangeNotStarted Code = "email_change_not_started"
CodeSetupNotAvailable Code = "setup_not_available"
CodeSetupAlreadyCompleted Code = "setup_already_completed"
CodeTokenInvalidOrExpired Code = "token_invalid_or_expired"