Next-gen identity server replacing your Auth0, Okta, Firebase with hardened security and PassKeys, SMS, OIDC, Social Sign In, MFA, FIDO, TOTP and OTP, WebAuthn, passwordless and much more. Golang, headless, API-first. Available as a worry-free SaaS with the fairest pricing on the market!
Existing VerificationURL and RecoveryURL variables assumes use of /self-serve/ endpoints, and not compatible with custom UI for native API implementations. Add VerificationFlowId / RecoveryFlowId (or just FlowId) variable for those who want to easily customize the templates.
Would also be nice to add a bank of additional variables that can be registered in the main kratos.yml file, that can be used for brand name, domains, URLs, disclaimers, etc. Variables from this config section could then easily be referenced by any Go template for email and later SMS, using dot notation like Identity.
Describe your ideal solution
Add additional variable(s) for FlowId that can be used when composing custom email templates.
Preflight checklist
Describe your problem
Existing VerificationURL and RecoveryURL variables assumes use of /self-serve/ endpoints, and not compatible with custom UI for native API implementations. Add VerificationFlowId / RecoveryFlowId (or just FlowId) variable for those who want to easily customize the templates.
Would also be nice to add a bank of additional variables that can be registered in the main kratos.yml file, that can be used for brand name, domains, URLs, disclaimers, etc. Variables from this config section could then easily be referenced by any Go template for email and later SMS, using dot notation like Identity.
Describe your ideal solution
Add additional variable(s) for FlowId that can be used when composing custom email templates.
See https://www.ory.sh/docs/kratos/emails-sms/custom-email-templates
Workarounds or alternatives
Use Go’s regex functions (see http://masterminds.github.io/sprig/strings.html#regexmatch-mustregexmatch) in the verification_code/valid/email.body.gotmpl and verification_code/valid/email.body.plaintext.gotmpl templates.
Example for verification_code/valid/email.body.gotmpl
Additional useful setup for testing/reproducing: Download Courier templates locally: OLD (Github no longer supports SVN)
NEW (more complicated process)
Add template override path to ory/kratos/kratos.yml:
Map local templates folder into Kratos container:
Version
v1.0.0
Additional Context
No response