Skip to content

Commit

Permalink
add 2nd identity schema
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha committed Oct 21, 2023
1 parent e2cd33f commit 5272ef1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
54 changes: 54 additions & 0 deletions ory/kratos/identity-alternative.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"$id": "https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"title": "E-Mail",
"minLength": 3,
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
},
"verification": {
"via": "email"
},
"recovery": {
"via": "email"
}
}
},
"name": {
"type": "object",
"properties": {
"first": {
"title": "First Name",
"type": "string"
},
"last": {
"title": "Last Name",
"type": "string"
}
}
},
"phone": {
"title": "Phone NUmber",
"type": "string",
"format": "tel"
}
},
"required": [
"email"
],
"additionalProperties": false
}
}
}
File renamed without changes.
4 changes: 3 additions & 1 deletion ory/kratos/kratos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ identity:
default_schema_id: default
schemas:
- id: default
url: file:///etc/config/kratos/identity.schema.json
url: file:///etc/config/kratos/identity-default.schema.json
- id: alternative
url: file:///etc/config/kratos/identity-alternative.schema.json

courier:
smtp:
Expand Down

0 comments on commit 5272ef1

Please sign in to comment.