Hi <@U011D3UQKNY>, <@U03HLFCQ3CN>, <@U01MTU9E4CF>,...
# talk-kratos
m
Hi @magnificent-energy-493, @fast-lunch-54279, @proud-plumber-24205, @high-optician-2097 Sorry to always tag you 4, but better the devs the you know than don't, amirite? šŸ˜… Quick question: Is it possible to access identity traits and verification flow IDs in the ORY mailer templates? I've seen
{{ .To }}
,
{{ .VerificationURL }}
&
{{ .VerificationCode }}
, but was wondering if one could also do stuff like: •
{{ identity.traits.first_name }}
•
{{ verification_flow.id }}
^ In the mailers? I don't see them listed as available variables, but thought to ask just in case the docs don't mention it
It seems the
{{ .Identity }}
key holds the traits I need, but I assume the
verification_flow.id
is not available?
p
Hi @miniature-sunset-64101
Yes the
{{ .Identity }}
is the only one available.
m
Thanks @proud-plumber-24205, I realised that I can access the verification flow ID from the
{{ .VerificationURL }}
by passing the entire URL as a query to a custom UI page, and deconstructing it. Inelegant, but it works well enough. There are a few instances like this where a little hack is required to remain on the custom UI and not end up being redirected to one of the built-in UI pages
f
ok. we're also adding an automated redirect from the default account experience pages to your UI when you configure overrides, so I believe this workaround will not be needed anymore soon - but great hack for now šŸ™‚