fix(auth): disable trial grants on public email flows
Build docker and publish / build (20.15.1) (push) Successful in 5m29s
Build docker and publish / build (20.15.1) (push) Successful in 5m29s
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user