mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-29 02:22:16 +00:00
fix: configure default url templates (#10416)
# Which Problems Are Solved Emails are still send only with URLs to login v1. # How the Problems Are Solved Add configuration for URLs as URL templates, so that links can point at Login v2. # Additional Changes None # Additional Context Closes #10236 --------- Co-authored-by: Marco A. <[email protected]>
This commit is contained in:
@@ -99,6 +99,9 @@ type Commands struct {
|
||||
// These instance's milestones never need to be invalidated,
|
||||
// so the query and cache overhead can completely eliminated.
|
||||
milestonesCompleted sync.Map
|
||||
|
||||
defaultEmailCodeURLTemplate func(ctx context.Context) string
|
||||
defaultPasswordSetURLTemplate func(ctx context.Context) string
|
||||
}
|
||||
|
||||
func StartCommands(
|
||||
@@ -120,6 +123,8 @@ func StartCommands(
|
||||
defaultRefreshTokenLifetime,
|
||||
defaultRefreshTokenIdleLifetime time.Duration,
|
||||
defaultSecretGenerators *SecretGenerators,
|
||||
defaultEmailCodeURLTemplate func(ctx context.Context) string,
|
||||
defaultPasswordSetURLTemplate func(ctx context.Context) string,
|
||||
) (repo *Commands, err error) {
|
||||
if externalDomain == "" {
|
||||
return nil, zerrors.ThrowInvalidArgument(nil, "COMMAND-Df21s", "no external domain specified")
|
||||
@@ -199,8 +204,10 @@ func StartCommands(
|
||||
Issuer: defaults.Multifactors.OTP.Issuer,
|
||||
},
|
||||
},
|
||||
GenerateDomain: domain.NewGeneratedInstanceDomain,
|
||||
caches: caches,
|
||||
GenerateDomain: domain.NewGeneratedInstanceDomain,
|
||||
caches: caches,
|
||||
defaultEmailCodeURLTemplate: defaultEmailCodeURLTemplate,
|
||||
defaultPasswordSetURLTemplate: defaultPasswordSetURLTemplate,
|
||||
}
|
||||
|
||||
if defaultSecretGenerators != nil && defaultSecretGenerators.ClientSecret != nil {
|
||||
|
||||
Reference in New Issue
Block a user