Application registration for an existing user fails#61
Application registration for an existing user fails#61TeddyPaddington wants to merge 1 commit intoFusionAuth:mainfrom
Conversation
…llable user field in the RegistrationRequest struct
|
Thanks for the patch, @TeddyPaddington ! Unfortunately I can't merge it directly, as that domain object is built by inspecting some java objects. We'll have to find some way to upstream the change. I'm no go expert; can you please show me how this change affects making a go client call? That's been one reason I haven't tried to fix this, I'm not sure how to test whether it'd be a breaking change or not. |
|
Ran into the same problem. The reason for the bug is that the User object is embedded into the RegistrationRequest and the json encoder cannot determine that it is empty, so it serializes it with empty fields into the request and it's then rejected by the server. Two other solutions are to create a separate RegistrationWithExistingUserRequest (presumably in the java source) or to change the server so it ignores the User object if it only has empty fields. |
|
Just ran into this issue today.
@mooreds you're saying the Go code is generated from Java objects? To your earlier question, Go struct fields don't have a it's equivalent to saying When that gets marshaled to JSON, it looks like: Which, because not null, is getting validated for fields. Making this PR change allows the I wrote a custom function in my local app to use a copied request struct (with this change) that mirrors the existing |
|
Merge it |
|
Thanks @smilad . We need to take a look at this, but unfortunately are busy with some other things internally (new release, documentation overhaul). Hopefully we can get to this in the next month or two. Sorry for the delay! |
|
Hi guys, any update on this? We're facing the same issue |
Application registration for an existing user fails due to the non-nillable user field in the RegistrationRequest struct. Change User type property to a pointer