fix(auth): disable trial grants on public email flows
Build docker and publish / build (20.15.1) (push) Successful in 5m29s

This commit is contained in:
2026-04-25 01:11:27 -07:00
parent 9db4762904
commit 5b49aa8242
6 changed files with 35 additions and 3 deletions
@@ -54,6 +54,14 @@ func ShouldGrantTrialForEmail(register config.RegisterConfig, email string) bool
return true
}
// ShouldAutoGrantTrialOnPublicEmailFlows defines whether browser/email-originated
// flows may auto-create a trial subscription. The current policy disables trial
// creation for email registration, email login auto-register, OAuth-with-email,
// and email binding/verification to avoid abuse through public email channels.
func ShouldAutoGrantTrialOnPublicEmailFlows(register config.RegisterConfig) bool {
return false
}
// IsDisposableAlias detects Gmail dot trick and + alias abuse.
// For Gmail-like domains, local part containing "." or "+" is rejected.
// For all other domains, only "+" alias is rejected.