cold-scientist-93808
08/08/2024, 10:50 AMchilly-king-10285
08/08/2024, 10:50 AMchilly-king-10285
08/08/2024, 10:50 AMadditionalProperties
to false
in the identity schema. Here is an example of how to deny additional properties in the identity schema: json { properties: { traits: { type: "object", properties: { // ... }, additionalProperties: false, }, }, }
For more information, you can refer to the [Kratos documentation on Identity metadata & traits](https://www.ory.sh/docs/kratos/manage-identities/managing-users-identities-metadata#traits) and [Customize identity schemas](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#additional-properties).cold-scientist-93808
08/08/2024, 10:57 AMchilly-king-10285
08/08/2024, 10:58 AMchilly-king-10285
08/08/2024, 10:58 AMadmin_metadata
to login. The admin_metadata
field in Ory Kratos is used to store metadata about the user which is only accessible through admin APIs. This metadata can't be updated or modified by the identity owner. For login purposes, Ory Kratos uses identifiers such as username or email and password. These are stored as traits and credentials respectively. For example, to use a username as the login identifier, you can define the following identity schema: json { "$id": "<https://example.com/registration.schema.json>", "$schema": "<http://json-schema.org/draft-07/schema#>", "title": "Person", "type": "object", "properties": { "traits": { "type": "object", "properties": { "username": { "type": "string", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "password": { "identifier": true } } } } } } } }
For more information, you can refer to the [Kratos documentation on Identity metadata & traits](https://www.ory.sh/docs/kratos/manage-identities/managing-users-identities-metadata) and [Customize identity schemas](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#username-and-password).cold-scientist-93808
08/08/2024, 11:03 AMchilly-king-10285
08/08/2024, 11:03 AMchilly-king-10285
08/08/2024, 11:04 AMjson { "$id": "<https://example.com/registration.schema.json>", "$schema": "<http://json-schema.org/draft-07/schema#>", "title": "Person", "type": "object", "properties": { "traits": { "type": "object", "properties": { "username": { "type": "string", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "password": { "identifier": true } } } } } } } }
For more information, you can refer to the [Kratos documentation on Identity metadata & traits](https://www.ory.sh/docs/kratos/manage-identities/managing-users-identities-metadata) and [Customize identity schemas](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#username-and-password).