[Dart ory_kratos_client] Unable to build `Update...FlowBody`
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 178
- Forks
- 96
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
No response
Describe the bug
updateRegistrationFlowBody requires
flow- Flow ID as stringupdateRegistrationFlowBody- builder function to create flow body
Unfortunately creating UpdateRegistrationFlowBody provides only oneOf, whereas auto-generated docs describe the required for me arguments like method, traits and so on.
I have tried creating flow body with following snippets with no success:
1
final body = UpdateRegistrationFlowBody((b) => b
..oneOf = UpdateRegistrationFlowWithPasswordMethod((p) => p
..password = password
..traits = Traits((t) => t..email = email)));
kratosClient
.updateRegistrationFlow(
flow: registrationFlow.id,
updateRegistrationFlowBody: body,
)
2
final body = UpdateRegistrationFlowBody((b) => b
..oneOf = OneOf<UpdateRegistrationFlowWithPasswordMethod>.of(
UpdateRegistrationFlowWithPasswordMethod(
(b) => b..password = password
)
)
);
This package however provides needed function to create flow body - SubmitSelfServiceRegistrationFlowBody
Reproducing the bug
- Create RegistrationFlow
- Try to update its body
Relevant log output
No response
Relevant configuration
No response
Version
0.13.1
On which operating system are you observing this issue?
macOS
In which environment are you deploying?
None
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with clients/kratos/dart/doc/UpdateRegistrationFlowBody.md and the generated UpdateRegistrationFlowBody model, then trace the updateRegistrationFlow entry point. Compare its available construction API with the documented method and traits fields and the SubmitSelfServiceRegistrationFlowBody example mentioned in the report. Done means the documented registration update body can be constructed and passed to updateRegistrationFlow successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100