Open PetrSilar opened 2 years ago
Could you expand when the error happens exactly? Is it after the user re-submits the registration form with the missing info, or immediately when the user returns from GitHub? It’s also possible that the UI is sending incorrect data here
The error appears immediately when the user returns from GitHub:
Please see the second entry of the attached log (strategy_registration.go:233), there are
identity_traits
with fruits
as an object already.
Thank you! Could you show the payload of the initial POST request which triggers the OAuth2 flow please? So the request rhat is happening when you click the „sign in with“ button. That would be very helpful.
Also, which UI are you using?
Thank you! Could you show the payload of the initial POST request which triggers the OAuth2 flow please? So the request rhat is happening when you click the „sign in with“ button. That would be very helpful.
Of course.
If you mean the request initiated from browser:
POST http://my.local/identities/self-service/registration?flow=80e7d332-e3bf-4251-9255-573da41d3ac6
Payload: csrf_token=<some token>&provider=github&traits.email=&password=
Also, which UI are you using?
kratos-selfservice-ui-node
Thank you! It appears as if our type guessing gets it wrong then and instead of an array initializes it with an empty object. This will require a bit of investigation and we always appreciate contributions :)
Thank you for analysis and confirmation! Unfortunately, Go is not language of mine.
Preflight checklist
Describe the bug
It is not possible to create new account (using GitHub in this case} when there is array property in used identity schema using version
0.9.0-alpha.3
.The identity schema looks like this (for example):
Please note
fruits
property. It's array, its items have to be an object containing at leastname
andweight
properties. GitHub's jsonnet is like this:Using e.g. quickstart example with modified configuration to use this schema and jsonnet, the creation of new account fails with expected array, but got object error. Please note this is regression since it works for me with version
0.6.3
(I didn't test this with other versions).Reproducing the bug
Steps to reproduce:
Expected result: New user is created in Kratos Actual result: User is not created and error message expected array, but got object is shown.
Relevant log output
Relevant configuration
No response
Version
0.9.0-alpha.3
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes
Additional Context
No response