Hi , I'm using Kratos and I am currently trying to...
# _newcomer
a
Hi , I'm using Kratos and I am currently trying to pass a transient_payload to the Settings flow. I'm sending this data :
Copy code
{
  "method": "password",
  "csrf_token": "hSGQXu8ewpBie4kKU0UPYYP84PaB6rJ5tcYtgIF1o+QztLIoigO+W+n2ZWYeXqMshyvulaZkyS6A/wiWbzYO9g==",
  "transient_payload": {
    "last_name": "Maxime",
    "first_name": "Test",
    "birthdate": "2025-03-19T23:00:00.000Z",
    "country": "fr",
    "is_invitation_flow": true
  },
  "password": "epicBear99.",
}
Looking at the documentation, this payload is correct. Also, we have already a transient_payload with the Registration flow which is correctly transmitted to an after hook. But unfortunately, with the after hook of the Settings flow, the transient_payload is not transmitted through the hook. Here is the part of my settings kratos configuration :
Copy code
...

selfservice:
  flows:
    settings:
      ui_url: SOMETHING-TO-OVERRIDE
      privileged_session_max_age: 336h
      required_aal: highest_available
      after:
        hooks:
          - hook: web_hook
            config:
              url: SOMETHING-TO-OVERRIDE
              method: POST
              body: <base64://ZnVuY3Rpb24oY3R4KSB7IGN0eDogY3R4IH0>=
              auth:
                type: api_key
                config:
                  name: X-API-Key
                  value: API_KEY_HOOK
                  in: header
        default_browser_return_url: SOMETHING-TO-OVERRIDE
  methods:
    password:
      enabled: true
    lookup_secret:
      enabled: true
    code:
      enabled: true
    link:
      enabled: true

serve:
  admin:
    base_url: SOMETHING-TO-OVERRIDE
    host: "0.0.0.0"
  public:
    base_url: SOMETHING-TO-OVERRIDE
    cors:
      enabled: true
      allowed_origins:
        - SOMETHING-TO-OVERRIDE
      allowed_headers:
        - Authorization
        - Cookie
        - Content-Type
      exposed_headers:
        - Content-Type
        - Set-Cookie
      allowed_methods:
        - POST
        - GET
        - PUT
        - PATCH
        - DELETE

session:
  lifespan: 336h
For information I use JS sdk 1.8.5 and kratos 1.3.1 Am I doing something wrong with my configuration ? Do we have something to understand really what is going on in Kratos ?
m
Hey @agreeable-receptionist-70632 it all looks correct to me, hard to say what the issue is without reproducing/investigating 😕 Some things that you could try: • Confirm that your web hook is being called at all after the settings flow completes. Check your web hook server logs to see if it's receiving requests. • Make sure your settings flow is completing successfully. AFAIK the
transient_payload
is only be passed when the flow reaches the "success" state. • Try using a different method (like "profile" instead of "password") to see if the issue is specific to the password method. • Look for any errors or warnings in your Kratos logs hope that helps!