kratos
kratos copied to clipboard
SDK `UpdateRegistrationFlow()` returns nil values despite successful call
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] 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
Hi, I was upgrading the kratos-client-go SDK version from v0.13.1
to v1.0.0
. Upon upgrading, I found a bug regarding the returned struct of the UpdateRegistrationFlow
function as it returns nil values.
Reproducing the bug
In the respSubmitFlow
, the variable contains nil values. However, on inspecting resp
, the body returns the information successfully.
// ...
// (usual flow of setting up kratos client)
respSubmitFlow, resp, err := publicClient.FrontendApi.UpdateRegistrationFlow(ctx).
Flow(flowId).UpdateRegistrationFlowBody(kratosClient.UpdateRegistrationFlowBody{
UpdateRegistrationFlowWithPasswordMethod: &kratosClient.UpdateRegistrationFlowWithPasswordMethod{
Method: "password",
Password: "Secured112233445",
Traits: map[string]interface{}{
"emails": []string{email},
"name_full": "test namefull",
"name_display": "test namedisplay",
}},
}).Execute()
if err != nil {
fmt.Println(err)
return
}
Relevant log output
No response
Relevant configuration
No response
Version
v1.0.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes with Helm
Additional Context
These are the screenshots of our debugging process.
The pictures below you can see respSubmitFlow
contains all the nil values. Whereas In resp
, the raw body contains otherwise.
The values for respSubmitFlow
The values for resp
Edit:
Looks like the decode function could not unmarshal the raw body correctly