Hey, I’m trying to setup a webhook for after a reg...
# ory-network
f
Hey, I’m trying to setup a webhook for after a registration happens. Any idea on what might be wrong with the configuration? I got a very similar configuration for the setting update which works.
Copy code
selfservice:
  flows:
    registration:
      after:
        code:
          hooks: []
        hooks:
        - config:
            auth:
              config:
                password: <secret>
                user: <secret>
              type: basic_auth
            body: <https://storage.googleapis.com/>....
            can_interrupt: false
            method: POST
            response:
              ignore: false
              parse: true
            url: https://<my url>
          hook: web_hook
        oidc:
          hooks:
          - hook: session
        password:
          hooks:
          - hook: session
        webauthn:
          hooks:
          - hook: session
      before:
        hooks: []
      enabled: true
      lifespan: 30m0s
      login_hints: false
      ui_url: /ui/registration
Ok, so I’ve managed to get the webhook for registration working but it seems like I get an identity id which is
00000000-0000-0000-0000-000000000000
in the
after hook
. Is this expected? This is problematic since that is something that we persist to reference the user. I’ve also tried passing back
id: "<A UUID>"
which it seems to ignore. It cares about other fields that I’m setting such as fields in
metadata_public
.
c
Hello Oscar, you should try setting
parse
to
false
here (see related discussion: https://ory-community.slack.com/archives/C012RJ2MQ1H/p1701447292129379?thread_ts=1701444694.746659&amp;cid=C012RJ2MQ1H)
f
Thanks for the reply Remi! The problem with that is that I do want to set fields such as
metadata_public
. If I set parse to false the metadata_public won’t be updated
c
I guess, you'd have to combine multiple hooks to do that, I did not deal with that yet but I'm curious if you figure something out 🙏