Skip to content

feat: added first draft for identity schema selection #2270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

deepakprabhakara
Copy link
Contributor

@deepakprabhakara deepakprabhakara commented Aug 8, 2025

Related Issue or Design Document

docs for Identity Schema Selection feature

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

@deepakprabhakara deepakprabhakara changed the title feature: added first draft for identity schema selection feat: added first draft for identity schema selection Aug 8, 2025
Copy link
Collaborator

@hperl hperl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@vinckr vinckr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, some minor style comments

next time you can try to add the README to your context or use it to do a final style check with LLM, then we can avoid 90% of the comments 😉


# Identity schema selection for self-service registration and login flows

Ory Kratos now supports selecting an identity schema during **registration** and **login** self-service flows by specifying a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Ory Kratos now supports selecting an identity schema during **registration** and **login** self-service flows by specifying a
Ory Kratos now supports selecting an identity schema during registration and login self-service flows by specifying a

please use bold formatting only when talking about specific UI elements.

you can also give an LLM the README as context (or parts of it) to follow our style: https://github.com/ory/docs?tab=readme-ov-file#bolding-code-formatting

query parameter. This gives administrators more control over which schemas are used and allows multi-tenant or multi-profile
setups with distinct identity models.

This feature is available in **Ory Kratos OEL** for now and will be available in Ory Network soon.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This feature is available in **Ory Kratos OEL** for now and will be available in Ory Network soon.

I am not sure if we should have this here, because we will 100% forget to update it later on.

Instead can we use a reusable text snippet like this one, that says something like "this feature is in preview, please reach out if you are interested" or something like that - for features that are not released in all versions of Ory yet.
IDK how you feel about this @unatasha8, there is probably a number of ways we can solve this.


### Registration Example

**Browser flow:**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you want a "small" headline you can use h5, no bolding please

GET /self-service/registration/browser?identity_schema=schema-a
```

**API flow:**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above


### Login Example

**Browser flow:**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above


## How to Use

### Registration Example
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Registration Example
### Registration example

- If a schema is not listed or not marked as selectable, it cannot be used via query param.
- If no `identity_schema` is passed, the default schema (`default_schema_id`) is used.

## Migration Notes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Migration Notes
## Migration notes

is this something we should include in all "feature" documents? @unatasha8 maybe we should come up with some template for new feature documents that engineering can use. Then these guides all look uniform.
I dont think we had a section for migration notes in any guide before, but then it does make sense to include it in a standard template maybe? or should we move this to the troubleshooting section?


- This feature is **non-breaking**. Existing flows using the default schema are unaffected.
- You only need to update configuration if you want to expose multiple schemas for selection.
- Schemas used internally (e.g., for admins or machine users) can remain non-selectable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Schemas used internally (e.g., for admins or machine users) can remain non-selectable.
- Schemas used internally can remain non-selectable, for example for admin or machine users.


## Migration Notes

- This feature is **non-breaking**. Existing flows using the default schema are unaffected.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- This feature is **non-breaking**. Existing flows using the default schema are unaffected.
- This feature is non-breaking. Existing flows using the default schema are unaffected.

Comment on lines +94 to +97
## Related Docs

- [Manage Identity Schema](./manage-identity-schema)
- [Customizing Identity Schemas](../../kratos/manage-identities/customize-identity-schema)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Related Docs
- [Manage Identity Schema](./manage-identity-schema)
- [Customizing Identity Schemas](../../kratos/manage-identities/customize-identity-schema)

I think this is good but I would like to solve it at once for all documents and not manually for every doc - we would also have to change hundreds of old docs with this.
the way I want to go about this is to add a tag to every document via LLM and then have a custom components that selects appropriate related docs by tag.

we can try this out soon, wdyt @unatasha8 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants