You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have stumbled upon a use case for my project to enhance the UX when unlinking accounts through Kratos. I wonder if it's possible to retrieve information such as the email address or name of a linked OIDC account using the Kratos HTTP API?
Currently, I am making a GET request to /self-service/settings/browser which returns something like this:
As you can see, there are nodes in the JSON response for unlinking a connected social sign in account, but I can't see fields that indicate which OIDC account is linked (such as a first/last name or email address for the account):
This is an example screenshot of how I'd like to display the linked accounts in my UI (as you can see, for Google, the linked account can be easily identified by the user because of the email address that is shown):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have stumbled upon a use case for my project to enhance the UX when unlinking accounts through Kratos. I wonder if it's possible to retrieve information such as the email address or name of a linked OIDC account using the Kratos HTTP API?
Currently, I am making a
GETrequest to/self-service/settings/browserwhich returns something like this:{ "id": "f32db083-6a96-4188-827d-9907a976e30d", "type": "browser", "expires_at": "2025-06-24T02:15:37.476644317Z", "issued_at": "2025-06-24T01:15:37.476644317Z", "request_url": "http://127.0.0.1:4433/self-service/settings/browser", "ui": { "action": "http://127.0.0.1:4433/self-service/settings?flow=f32db083-6a96-4188-827d-9907a976e30d", "method": "POST", "nodes": [ { "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": "traits.email", "type": "email", "value": "john.doe@example.com", "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": "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" } } }, { "type": "input", "group": "oidc", "attributes": { "name": "link", "type": "submit", "value": "facebook", "disabled": false, "node_type": "input" }, "messages": [], "meta": { "label": { "id": 1050002, "text": "Link facebook", "type": "info", "context": { "provider": "facebook" } } } }, { "type": "input", "group": "oidc", "attributes": { "name": "unlink", "type": "submit", "value": "google", "disabled": false, "node_type": "input" }, "messages": [], "meta": { "label": { "id": 1050003, "text": "Unlink google", "type": "info", "context": { "provider": "google" } } } }, { "type": "img", "group": "totp", "attributes": { "src": "<redacted>", "id": "totp_qr", "width": 256, "height": 256, "node_type": "img" }, "messages": [], "meta": { "label": { "id": 1050005, "text": "Authenticator app QR code", "type": "info" } } }, { "type": "text", "group": "totp", "attributes": { "text": { "id": 1050006, "text": "<redacted>", "type": "info", "context": { "secret": "<redacted>" } }, "id": "totp_secret_key", "node_type": "text" }, "messages": [], "meta": { "label": { "id": 1050017, "text": "This is your authenticator app secret. Use it if you can not scan the QR code.", "type": "info" } } }, { "type": "input", "group": "totp", "attributes": { "name": "totp_code", "type": "text", "required": true, "disabled": false, "node_type": "input" }, "messages": [], "meta": { "label": { "id": 1070006, "text": "Verify code", "type": "info" } } }, { "type": "input", "group": "totp", "attributes": { "name": "method", "type": "submit", "value": "totp", "disabled": false, "node_type": "input" }, "messages": [], "meta": { "label": { "id": 1070003, "text": "Save", "type": "info" } } } ] }, "identity": { "id": "ebd0f982-7d7f-4308-8332-1a49c52ae499", "schema_id": "default", "schema_url": "http://127.0.0.1:4433/schemas/ZGVmYXVsdA", "state": "active", "state_changed_at": "2025-06-11T13:56:52.385647Z", "traits": { "email": "john.doe@example.com" }, "metadata_public": null, "created_at": "2025-06-11T13:56:52.412165Z", "updated_at": "2025-06-11T13:56:52.412165Z", "organization_id": null }, "state": "show_form" }As you can see, there are nodes in the JSON response for unlinking a connected social sign in account, but I can't see fields that indicate which OIDC account is linked (such as a first/last name or email address for the account):
This is an example screenshot of how I'd like to display the linked accounts in my UI (as you can see, for Google, the linked account can be easily identified by the user because of the email address that is shown):

Beta Was this translation helpful? Give feedback.
All reactions