rough-night-90404
12/27/2023, 10:30 PM<button class="button button--main" {...node.attributes}>{node.meta.label?.text}</button>
The UI renders out to
<div class="ui s-hey5M-KtjxHz">
<p class="message info s-hey5M-KtjxHz">An email containing a recovery code has been sent to the email address you provided. If you have not received an email, check the spelling of the address and make sure to use the address you registered with.</p>
<input name="csrf_token" type="hidden" value="1G2L+qsK72Bstr2dtGufFR1qI5jJ9jHek9vJ8DshKRBkQnZ9F8pPGBi/0Zpr+EgOiuCiCdAnA664jPQatdXJeQ==" required="" node_type="input" class="s-hey5M-KtjxHz"/>
<input placeholder="Recovery code" name="code" type="text" required="" node_type="input" class="s-hey5M-KtjxHz"/>
<input name="method" type="hidden" value="code" node_type="input" class="s-hey5M-KtjxHz"/>
<button class="button button--main s-hey5M-KtjxHz" name="method" type="submit" value="code" node_type="input">Submit</button>
<button class="button button--main s-hey5M-KtjxHz" name="email" type="submit" value="mike@email.com" node_type="input">Resend code</button>
</div>
and this is the JSON that Kratos gives me
{
"action": "<https://dev.server.com/auth/self-service/recovery?flow=09065571-4541-4798-8368-8c0fed15a269>",
"method": "POST",
"nodes": [
{
"type": "input",
"group": "default",
"attributes": {
"name": "csrf_token",
"type": "hidden",
"value": "1G2L+qsK72Bstr2dtGufFR1qI5jJ9jHek9vJ8DshKRBkQnZ9F8pPGBi/0Zpr+EgOiuCiCdAnA664jPQatdXJeQ==",
"required": true,
"disabled": false,
"node_type": "input"
},
"messages": [],
"meta": {}
},
{
"type": "input",
"group": "code",
"attributes": {
"name": "code",
"type": "text",
"required": true,
"disabled": false,
"node_type": "input"
},
"messages": [],
"meta": {
"label": {
"id": 1070010,
"text": "Recovery code",
"type": "info"
}
}
},
{
"type": "input",
"group": "code",
"attributes": {
"name": "method",
"type": "hidden",
"value": "code",
"disabled": false,
"node_type": "input"
},
"messages": [],
"meta": {}
},
{
"type": "input",
"group": "code",
"attributes": {
"name": "method",
"type": "submit",
"value": "code",
"disabled": false,
"node_type": "input"
},
"messages": [],
"meta": {
"label": {
"id": 1070005,
"text": "Submit",
"type": "info"
}
}
},
{
"type": "input",
"group": "code",
"attributes": {
"name": "email",
"type": "submit",
"value": "mike@email.com",
"disabled": false,
"node_type": "input"
},
"messages": [],
"meta": {
"label": {
"id": 1070008,
"text": "Resend code",
"type": "info"
}
}
}
],
"messages": [
{
"id": 1060003,
"text": "An email containing a recovery code has been sent to the email address you provided. If you have not received an email, check the spelling of the address and make sure to use the address you registered with.",
"type": "info",
"context": {}
}
]
}
Am I missing something?
Do I just have the whole concept wrong to where each group should be a separate form element?refined-alligator-28757
12/28/2023, 3:18 AMrough-night-90404
12/29/2023, 2:29 AM