Hello, any one had any issues with OryActions not ...
# ory-network
p
Hello, any one had any issues with OryActions not sending webhooks? We've tried taking the function to the point where it should only be returning an empty json, and tried with the examples, but we aren't seeing any posts to our endpoint at all.
I created a ticket for this issue. https://github.com/ory/network/issues/366
f
@proud-stone-13137 We’ve configured our webhooks to be per login method and then it seems to work, the generic configuration that should apply for all login methods doesn’t seem to work.
p
@fast-eve-41839 ive done it using the web console with a setup for after registration and after settings and im not seeing anything in our logs when triggering either. You are having success through the cli i take it?
f
No, I’ve managed to do it through both. Can send you examples when I am at my computer tomorrow morning.
p
i mean it looks pretty simple, i originally put in this function to get the elements I wanted:
Copy code
function(ctx) {
    user_id: ctx.identity.id,
    created_at: ctx.identity.created_at,
    updated_at: ctx.identity.updated_at,
    schema_id: ctx.identity.schema_id,
    schema_url: ctx.identity.schema_url,
    state: ctx.identity.state,
    state_changed_at: ctx.identity.state_changed_at,
    traits: ctx.identity.traits,
    verifiable_addresses: ctx.id.verifiable_addresses,
    recovery_addresses: ctx.identity.recovery_addresses

}
but then i tried just using
Copy code
function(ctx) {

}
as an empty function as i figured that would send a blank json and I'd at least get something I could debug if the function above was not correct, also just tried:
Copy code
function(ctx) {
    user_id: ctx.identity.id
}
for the same effort at debugging, but in each case saw no calls going through
here is one of the configuration pages
ive tried posting a similarly blank json against the endpoint and it did show up in the logs using the exact same url i have in the configuration, and tried both async on and off
f
Ye, I’ve not managed to get it working with
Method
ALL
but if I create two separate webhooks, one for profile and one for password it work.
Copy code
function(ctx) {
    user_id: ctx.identity.id
}
looks good to me. When using the CLI you have to base64 encode it.
p
Yeah, thats definitely the thing. I'm going to try to do the yaml right now, but with that setup, ive gotten no activity at all on the endpoint
ok, i think i figured out exactly whats happening when you select all on the UI. When using the the cli, I pulled the identity config, and the webhook was set for webauthn and oidc, but it was not set for password!
after:
code: hooks: [] hooks: - config: auth: config: in: header name: [header here] value: "" type: api_key body: https://storage.googleapis.com/bac-gcs-production/e492efd84ed68d021be8954e99fa3a7a53f88add7bc6a2f0879c8480634b5f2ea66f1b3c38b357cf3afc4db6727e01ff1e4c8cbb7ac07a2c91f2bf495f93b0ad.jsonnet can_interrupt: false method: POST response: ignore: true parse: false url: [url here] hook: web_hook oidc: hooks: - config: auth: config: in: header name: [header here] value: "" type: api_key body: https://storage.googleapis.com/bac-gcs-production/e492efd84ed68d021be8954e99fa3a7a53f88add7bc6a2f0879c8480634b5f2ea66f1b3c38b357cf3afc4db6727e01ff1e4c8cbb7ac07a2c91f2bf495f93b0ad.jsonnet can_interrupt: false method: POST response: ignore: true parse: false url: [url here] hook: web_hook - hook: session password: hooks: - hook: session webauthn: hooks: - config: auth: config: in: header name: [header here] value: "" type: api_key body: https://storage.googleapis.com/bac-gcs-production/e492efd84ed68d021be8954e99fa3a7a53f88add7bc6a2f0879c8480634b5f2ea66f1b3c38b357cf3afc4db6727e01ff1e4c8cbb7ac07a2c91f2bf495f93b0ad.jsonnet can_interrupt: false method: POST response: ignore: true parse: false url: [url here] hook: web_hook - hook: session before: hooks: [] login_hints: true ui_url: /ui/registration```
interestingly, when i updated it back, it set them up seporately in the ui, though prior to the update, it only had the "All" method in the ui.
I updated my ticket on github with this information.