witty-fountain-21673
08/21/2024, 11:50 PMsent_email
but the email i receive is the one configured for notify_unknown_recipients
even though the user exists in my database. What am I missing?chilly-king-10285
08/21/2024, 11:50 PMchilly-king-10285
08/21/2024, 11:51 PMnotify_unknown_recipients
flag in your configuration might be set to true
. This flag, when enabled, sends an attempted recovery notification to the email address that was used in the attempt, even if the email address is not registered. This is a security measure to prevent account enumeration attacks. If you want to send recovery emails only to registered email addresses, you should set notify_unknown_recipients
to false
in your configuration. Here is how you can update it: 1. Download the Ory Identities configuration from your project and save it to a file: bash ## List all available workspaces ory list workspaces ## List all available projects ory list projects --workspace <workspace-id> ## Get config ory get identity-config --project <project-id> --workspace <workspace-id> --format yaml > identity-config.yaml
2. Set notify_unknown_recipients
to false
in the identity-config.yaml
file: yaml flows: recovery: enabled: true lifespan: 15m # Defines how much time the user has to complete the recovery flow in the UI. Default: 1h. use: code # Defines which method is used, one of 'code' or 'link'. notify_unknown_recipients: false # Defines if the system sends attempted recovery notifications to unregistered addresses.
3. Update the Ory Identities configuration using the file you worked with: bash ory update identity-config --project <project-id> --workspace <workspace-id> --file identity-config.yaml
For more information, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/self-service/flows/account-recovery-password-reset#attempted-recovery-notifications).witty-fountain-21673
08/21/2024, 11:51 PMchilly-king-10285
08/21/2024, 11:51 PMchilly-king-10285
08/21/2024, 11:52 PMnotify_unknown_recipients
email. This email is typically sent when an attempt is made to initiate recovery for unregistered addresses, as a measure to prevent account enumeration attacks. If you're receiving this email for a registered address, it might indicate an issue with how the system is recognizing registered users. Ensure that the email address in the database matches exactly with the one being used for recovery, including any case sensitivity. If the issue persists, it might be worth checking the system logs for any errors or unexpected behavior during the recovery process. For more information, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/self-service/flows/account-recovery-password-reset#attempted-recovery-notifications).witty-fountain-21673
08/21/2024, 11:56 PMchilly-king-10285
08/21/2024, 11:56 PMchilly-king-10285
08/21/2024, 11:56 PMtraits
section are supported as well. Here is an example of how to specify a trait of the identity to be used for recovery: json { "$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", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "password": { "identifier": true } }, "recovery": { "via": "email" } } } } "additionalProperties": false } } }
In this schema, the email
field is used for recovery. Make sure that the recovery address in your identities table matches the field specified in your identity schema. If the issue persists, it might be a bug or an unexpected behavior in Ory. In that case, consider reaching out to the Ory community or support for further assistance. For more information, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/self-service/flows/account-recovery-password-reset#account-recovery-address).witty-fountain-21673
08/21/2024, 11:59 PM{
"$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",
"minLength": 6,
"<http://ory.sh/kratos|ory.sh/kratos>": {
"credentials": {
"password": {
"identifier": true
}
},
"verification": {
"via": "email"
},
"recovery": {
"via": "email"
}
}
},
"name": {
"type": "object",
"properties": {
"first": {
"type": "string"
},
"last": {
"type": "string"
}
}
}
},
"required": [
"email"
],
"additionalProperties": false
}
}
}
chilly-king-10285
08/21/2024, 11:59 PMchilly-king-10285
08/21/2024, 11:59 PMwitty-fountain-21673
08/22/2024, 1:08 AMchilly-king-10285
08/22/2024, 1:08 AMchilly-king-10285
08/22/2024, 1:08 AMwitty-fountain-21673
08/22/2024, 1:09 AMchilly-king-10285
08/22/2024, 1:09 AMchilly-king-10285
08/22/2024, 1:10 AM