Hey all.. I have been wondering, what is the best ...
# general
l
Hey all.. I have been wondering, what is the best way to go about this.. I am selfhosting the various Ory components and that woks fine. I've simplified and rewritten most of the kratos ui node for my use and am using this as the settings view. https://gist.github.com/randohinn/a1eaf02f406aa396dfd3a494d4025479. Everything works. However, what I would now like to achieve is the following: I have created a trait traits.agreements that has two booleans inside. Call them `centre_newsletter`and
store_newsletter
These render on the dashboard as checkboxes. Upon save, I now need to run a request off to the newsletter api to subscibe or unsubscribe the user.. Am i destined to just run this request every time the dashboard loads based on current state, or is there somewhere elegant, I could inject into the save flow? Possibly open to making a request to my backend and fomehow triggering the kratos save from there?
a
Would a web hook do the job? (search for
hooks:
on https://www.ory.sh/docs/kratos/reference/configuration)
and there’s some further documentation contained in https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks
l
ooh, sounds like it would. Thank you!
👍 1
Implemented and working! Thanks again!
💥 1