-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing transient payload in registration form (server-side, browser) #2029
Comments
@akhayyat and anyone else encountering the same issue... {
"traits.something": "some-value",
"traits.some-other-thing": "another-value",
"transient_payload": {
"nested-key": "this-works"
}
} Note that The problem with this approach however, is that I don't know how to embed this in HTML because when it was simple dot separated names, you could simply have an (The realization of the proposed solution for me was to initiate a native-mobile flow and then passing the nested JSON in the terminal) The jsonnet for the above payload would be the following: function(ctx) {
[if 'nested-key' in ctx.flow.transient_payload then 'nested-key']: ctx.flow.transient_payload.nested-key
} Another problem with the documentation is that when trying to explain how to use I expect to see |
I had the same problem and was glad I found your comment @meysam81, otherwise I would probably have too wasted many more hours trying to figure out why stuff is not working even though I stick to the documentation. To @akhayyat, my current solution for still using the dotted input field names and
With this I can access the payload without problems using the jsonnet function below:
|
I‘m moving this to docs so we can improve this there. fyi @christiannwamba |
Preflight checklist
Ory Network Project
No response
Describe the bug
In a server-side web application, I am trying to get additional data in the registration form using transient payload, as documented in https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration and https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks.
Instead of getting the input value entered in the form, my application web hook receives a
transient_payload
value of{ }
.My understanding is that this would work if the registration request was json-encoded. My question is: doesn't transient payload support plain HTML forms (form-encoded)? (with multiple fields in the transient payload). And is this documented?
Reproducing the bug
docker compose -f quickstart.yml up --build --force-recreate
transient_payload.channel_name
(I'm testing with one transient payload field now, but I will need to be able to include multiple fields)."transient_payload": {}
.Relevant log output
`ctx` object
This is the
ctx
object received by the web application as a result of the web hook.Relevant configuration
`quickstart.yml`
`kratos.yml`
Web Hook Body
The base64-encoded registration web hook body included in the
kratos.yml
file above decodes to:Registration Form
Version
1.0.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker Compose
Additional Context
No response
The text was updated successfully, but these errors were encountered: