auth: mandatory email verification in cloud mode#227
Merged
Conversation
Cloud-hosted instances now require users to verify their email before they can access any non-auth endpoint. Frontend: hide the 'Skip for now' button on the email verification step when DEPLOYMENT_MODE=cloud. Backend: new EmailVerifiedGuard registered globally. When DEPLOYMENT_MODE=cloud, authenticated users whose emailVerified=false are rejected with 403, except on the auth-flow paths needed to complete verification (verify-email, resend-verification, login, register, forgot/reset password, logout, health). Self-hosted deployments are unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DEPLOYMENT_MODE=cloudso cloud users cannot bypass verification post-registration.EmailVerifiedGuardregistered as a globalAPP_GUARD. In cloud mode it rejects authenticated requests from users withemailVerified=falsewith403 Forbidden, except on the auth-flow paths needed to actually verify (verify-email,resend-verification,login,register,forgot/reset-password,logout,health).Why
On
cloud.anythingmcp.comusers were able to register, click Skip for now, and use the service indefinitely without ever verifying their email. That broke abuse-prevention and trial-tracking. Behavior must remain unchanged for self-hosted operators who don't run SMTP.Test plan
DEPLOYMENT_MODE=cloud— register, confirm Skip button is gone, confirm protected endpoints return 403 until verified, confirm/api/auth/verify-emailworksDEPLOYMENT_MODE=cloud— after verification, all endpoints work as beforeDEPLOYMENT_MODE=self-hosted(or unset) — Skip still appears, all endpoints work regardless ofemailVerified