Hello, I am using the Ory Network and I have setup...
# ory-network
f
Hello, I am using the Ory Network and I have setup a webhook for segment using this doc: https://www.ory.sh/docs/actions/integrations/segment. Here is my config in Yaml format:
Copy code
registration:
      after:
        code:
          hooks:
          - hook: session
        oidc:
          hooks:
          - hook: session
        password:
          hooks:
          - hook: session
        webauthn:
          hooks:
          - hook: session
        hooks:
        - hook: web_hook
          config:
            url: <https://api.segment.io/v1/identify>
            method: POST
            body: base64://${SEGMENT_IDENTIFY_JSONNET_BASE64}
            auth:
              type: basic_auth
              config:
                user: ${SEGMENT_WRITE_KEY}
                password: ""
When registering a new user, I don’t see anything in Segment. I don’t know where to look for error logs. I have copied the hook to the
login->after->hook
path in the config, and the webhook is working correctly when I login. Is there something specific to do about the register flow to make segment work ?
b
What’s your project ID?
f
37f4eaf2-c2f2-46da-ba16-e1e1e4fc8c1c
b
Do you still have the flow ID of the flow where the hook didn’t work?
f
I just registered with the flow:
aab635c4-8ae6-4703-830f-b60afae2a230
and I see nothing in Segment
b
I think the issue is, that you defined the webhook in the “generic” section (not a methods own). Could you try moving the hook definition into the
hooks
of the method you used in the registration flow?
f
Yes I will try
Ok I tried with the flow
b9d13146-5c42-481b-b1f7-955e94672149
(I’m using the
code
method) I still don’t see anything in Segment.
b
Hm, strange. Could you try with password? It should work, but might be a bug in the code registration method.
f
It worked with the password method
b
I see, then this is a bug in the code method, could you open an issue in ory/network? Thank you. cc @proud-plumber-24205
f
b
Awesome, thank you very much!