cold-scientist-93808
08/09/2024, 11:12 AMchilly-king-10285
08/09/2024, 11:12 AMchilly-king-10285
08/09/2024, 11:12 AMmethods
payload in the Registration Flow. Here is an example of how to fetch it: bash curl -H "Accept: application/json" -s \ '<https://playground.projects.oryapis.com/self-service/registration/flows?id=388ae8da-4c44-4765-bfa8-669963d388f5>' | jq
In the response, you will find the password field in the nodes
array: json { "type": "input", "group": "password", "attributes": { "name": "password", "type": "password", "required": true, "disabled": false }, "messages": null, "meta": { "label": { "id": 1070001, "text": "Password", "type": "info" } } }
Similarly, during password update, the password is part of the methods
payload in the Settings Flow: bash curl -s -X GET \ -H "Authorization: Bearer $sessionToken" \ -H "Accept: application/json" \ <https://playground.projects.oryapis.com/self-service/settings/api> | jq -r '.ui.nodes[] | select(.group=="password")'
In the response, you will find the password field in the nodes
array: json { "type": "input", "group": "password", "attributes": { "name": "password", "type": "password", "required": true, "disabled": false }, "messages": [], "meta": { "label": { "id": 1070001, "text": "Password", "type": "info" } } }
Please note that these examples fetch the password field, not the actual password entered by the user. The actual password is not returned in the response for security reasons. For more information, you can refer to the [Ory Kratos User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration) and [Ory Kratos User Settings and Profile Updates Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#update-password). Sources: - [User Registration](https://www.ory.sh/docs/kratos/self-service/flows/user-registration#registration-with-usernameemail-and-password-1) - [User Settings and Profile Updates](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#update-password-1)