sparse-father-97864
06/07/2024, 6:19 PMchilly-king-10285
06/07/2024, 6:19 PMchilly-king-10285
06/07/2024, 6:19 PMcredentials field with an oidc subfield in your identity schema. This oidc subfield should contain a config field, which in turn contains a providers array. Each provider in this array should have a provider field set to the social sign-in provider ID (in this case, "facebook") and a subject field set to the ID of the user on the given platform. Here is an example of how to structure this in your identity schema: json { "schema_id": "<preset://email>", "traits": { "email": "[[email protected]](<https://www.ory.sh/cdn-cgi/l/email-protection>)" }, "credentials": { "oidc": { "config": { "providers": [ { "provider": "facebook", "subject": "12345" } ] } } } } In this example, replace "12345" with the actual user ID from Facebook. Please note that the subject ID must be the ID of the user on the given platform. Usually, this is the sub claim of the OpenID Connect ID Token provider. For more information, refer to the [Ory documentation on importing social sign-in connections](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#social-sign-in-connections).sparse-father-97864
06/07/2024, 6:23 PMchilly-king-10285
06/07/2024, 6:23 PMchilly-king-10285
06/07/2024, 6:24 PMjson { "$schema": "<http://json-schema.org/draft-07/schema#>", "type": "object", "properties": { "traits": { "type": "object", "properties": { "username": { "title": "Username", "type": "string" }, "name": { "type": "object", "properties": { "first": { "title": "First name", "type": "string" }, "last": { "title": "Last name", "type": "string" } } } } } } } In this example, the traits include a username and a name object, which includes first and last names. For more information on managing identities and customizing identity schemas in Ory Kratos, you can refer to the [official Ory Kratos documentation](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#writing-your-first-custom-identity-schema).sparse-father-97864
06/07/2024, 6:30 PM"traits": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"title": "E-Mail",
"<http://ory.sh/kratos|ory.sh/kratos>": {
"credentials": {
"password": {
"identifier": true
},
"webauthn": {
"identifier": true
},
"totp": {
"account_name": true
},
"code": {
"identifier": true,
"via": "email"
}
},
"recovery": {
"via": "email"
},
"verification": {
"via": "email"
}
},
"maxLength": 320
},
},
"required": [
"email"
],
"additionalProperties": false
}
In the <http://ory.sh/kratos|ory.sh/kratos> section of the identity schema, do I need to include anything around OIDC?chilly-king-10285
06/07/2024, 6:30 PMchilly-king-10285
06/07/2024, 6:30 PM