Registration flow not returning password field #4025
-
Hi there! Trying to build a custom UI for self-service but the flow endpoint is not returning the password field even thought I've enabled it in the configuration. Here are my configuration files:
{
"$id": "https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"title": "E-Mail",
"minLength": 3,
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
}
}
}
},
"required": ["email"]
}
},
"additionalProperties": false
}
version: v0.13.0
dsn: memory
serve:
public:
base_url: http://127.0.0.1:4433/
cors:
enabled: true
allowed_origins:
- http://localhost:8081
allowed_methods:
- GET
- POST
- PUT
- PATCH
- DELETE
allowed_headers:
- Authorization
- Cookie
- Content-Type
exposed_headers:
- Content-Type
- Set-Cookie
allow_credentials: true
admin:
base_url: http://kratos:4434/
selfservice:
default_browser_return_url: http://localhost:8081/welcome
allowed_return_urls:
- http://localhost:8081
methods:
password:
enabled: true
flows:
error:
ui_url: http://localhost:8081/error
logout:
after:
default_browser_return_url: http://localhost:8081/login
login:
ui_url: http://localhost:8081/login
registration:
lifespan: 10m
ui_url: http://localhost:8081/registration
after:
password:
hooks:
- hook: session
log:
level: trace
secrets:
cookie:
- PLEASE-CHANGE-ME-I-AM-VERY-INSECURE
cipher:
- 32-LONG-SECRET-NOT-SECURE-AT-ALL
identity:
default_schema_id: default
schemas:
- id: default
url: file:///etc/config/kratos/identity.schema.json This is the code that initiates the flow and its response: fetch(`http://localhost:4433/self-service/registration/browser`, {
credentials: 'include',
headers: {
'Content-Type': 'application/json',
accept: 'application/json',
}
}) {
"id": "07c09abf-929e-4b2a-a17b-c7c5e662c8de",
"type": "browser",
"expires_at": "2024-08-05T08:00:54.894851584Z",
"issued_at": "2024-08-05T07:50:54.894851584Z",
"request_url": "http://localhost:4433/self-service/registration/browser",
"ui": {
"action": "http://127.0.0.1:4433/self-service/registration?flow=07c09abf-929e-4b2a-a17b-c7c5e662c8de",
"method": "POST",
"nodes": [
{
"type": "input",
"group": "default",
"attributes": {
"name": "traits.email",
"type": "email",
"required": true,
"autocomplete": "email",
"disabled": false,
"node_type": "input"
},
"messages": [],
"meta": {
"label": {
"id": 1070002,
"text": "E-Mail",
"type": "info",
"context": {
"title": "E-Mail"
}
}
}
},
{
"type": "input",
"group": "default",
"attributes": {
"name": "csrf_token",
"type": "hidden",
"value": "<redacted>",
"required": true,
"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": 1040001,
"text": "Sign up",
"type": "info"
}
}
}
]
},
"organization_id": null,
"state": "choose_method"
} As I understand, according to the docs, the password field should be present in the nodes array. Not sure what I'm missing. Any help would be appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'll answer myself. Two-step registration is now the default: https://github.com/ory/kratos/releases/tag/v1.2.0#:~:text=To%20disable%2C%20set-,selfservice.flows.registration.enable_legacy_one_step,-to%20true. |
Beta Was this translation helpful? Give feedback.
I'll answer myself. Two-step registration is now the default: https://github.com/ory/kratos/releases/tag/v1.2.0#:~:text=To%20disable%2C%20set-,selfservice.flows.registration.enable_legacy_one_step,-to%20true.