Hello Ory :wave: I have a relatively simple proble...
# talk-kratos
s
Hello Ory 👋 I have a relatively simple problem I think. What I’m trying to do: Update a user’s kratos password via a native application. Background: we use ory kratos as our identity provider for a front end flutter application. We previously have been using the packaged react kratos ui node. It worked. To have a more seamless integration into the app though, we’ve been moving parts into the native app. We have login and sign up completed, with login via username(email)/pw, apple, and Google. We are now trying to move the settings functionality (change email, change password, link social sign in) into the app, and I’m getting a 400 for the update password, which is the first of the 3 that I’m working on, since it seemed the most well documented in the ory docs. I’m starting the flow, grabbing the action url, and sending Json to that endpoint JSON example:
Copy code
Map<String, dynamic> headers = {
       "Authorization": "Bearer $key",
       "Accept": "application/json",
       "Content-Type": "application/json",
     };
 
     var payload = jsonEncode(<String, String>{
       "password": newPassword,
       "method": "password"
     });
Copy code
{400, Bad Request, {id: 468a6b52-1105-41eb-9169-5cac6b06ebd1, type: api, expires_at: 2023-08-22T14:41:13.760681Z, issued_at: 2023-08-22T13:41:13.760681Z, request_url: <https://auth>.<domain>.com/self-service/settings/api, ui: {action: <https://auth>.<domain>.com/self-service/settings?flow=468a6b52-1105-41eb-9169-5cac6b06ebd1, method: POST, nodes: [{type: input, group: default, attributes: {name: csrf_token, type: hidden, value: , required: true, disabled: false, node_type: input}, messages: [], meta: {}}, {type: input, group: default, attributes: {name: traits, type: text, disabled: false, node_type: input}, messages: [{id: 4000001, text: additionalProperties "name" not allowed, type: error}], meta: {}}, {type: input, group: profile, attributes: {name: traits.email, type: email, value: <mailto:newfake1@fakeemail.com|newfake1@fakeemail.com>, required: true, autocomplete: email, disabled: false, node_type: input}, messages: [], meta: {label: {id: 1070002, text: E-Mail, type: info}}}, {type: input, group profile, attributes: {name: traits.name.last, type: text, value: Fake1, disabled: false, node_type: input}, messages: [], meta: {}}, {type: input, group: profile, attributes: {name: traits.name.first, type: text, value: New, disabled: false, node_type: input}, messages: [], meta: {}}, {type: input, group: profile, attributes: {name: method, type: submit, value: profile, disabled: false, node_type: input}, messages: [], meta: {label: {id: 1070003, text: Save, type: info}}}, {type: input, group: password, attributes: {name: password, type: password, required: true, autocomplete: new-password, disabled: false, node_type: input}, messages: [], meta: {label: {id: 1070001, text: Password, type: info}}}, {type: input, group: password, attributes: {name: method, type: submit, value: password, disabled: false, node_type: input}, messages: [], meta: {label: {id: 1070003, text: Save, type: info}}}]}, identity: {id: ee58b782-8df2-4985-b37b-0287273c17bf, schema_id: default, schema_url: <https://auth>.<domain>.com/schemas/ZGVmYXVsdA, state: active, state_changed_at: 2023-06-26T13:15:23.261302Z, traits: {name: {last: Fake1, first: New}, email: <mailto:newfake1@fakeemail.com|newfake1@fakeemail.com>}, verifiable_addresses: [{id: 27d08898-2f08-4f88-b5dc-372bc5761b1b, value: <mailto:newfake1@fakeemail.com|newfake1@fakeemail.com>, verified: false, via: email, status: sent, created_at: 2023-06-26T13:15:23.404225Z, updated_at: 2023-06-26T13:15:23.404225Z}], recovery_addresses: [{id: d5c10ab8-2839-4707-af77-086060de0798, value: <mailto:newfake1@fakeemail.com|newfake1@fakeemail.com>, via: email, created_at: 2023-06-26T13:15:23.502034Z, updated_at: 2023-06-26T13:15:23.502034Z}], metadata_public: null, created_at: 2023-06-26T13:15:23.307753Z, updated_at: 2023-06-26T13:15:23.307753Z}, state: show_form}}
the error of note is:
Copy code
[{id: 4000001, text: additionalProperties "name" not allowed, type: error}]
I just don’t understand where this error is coming from