List of excluded email domains #1617
-
Hello, Is it possible to reject a registration if the email domain is a part of an excluded domains list ? I haven't found anything about that in Kratos itself, but I don't know if I can achieve that thanks to Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Currently not, but this could probably be implemented with a web-hook once #1585 is merged |
Beta Was this translation helpful? Give feedback.
-
I mean you can to that with JSONSchema by specifying something similar to: {
"$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,
"not": {
"anyOf": [
{
"pattern": "@google\\.com$"
},
{
"pattern": "@q-mail\\.com$"
}
]
},
.... but I would consider this more of a workaround than a fix. |
Beta Was this translation helpful? Give feedback.
I mean you can to that with JSONSchema by specifying something similar to: