rough-kilobyte-98919
08/15/2025, 1:03 AMmaster
branchbrief-egg-61061
08/15/2025, 1:03 AMbrief-egg-61061
08/15/2025, 1:03 AMrough-kilobyte-98919
08/19/2025, 7:28 AMunrecognized import path "code.dny.dev/ssrf": https fetch: Get "<https://code.dny.dev/ssrf?go-get=1>": tls: failed to verify certificate: x509: certificate signed by unknown authority
brief-egg-61061
08/19/2025, 7:28 AMbrief-egg-61061
08/19/2025, 7:29 AMmake docker
](https://github.com/ory/kratos/issues/4448) [Docker images](https://www.ory.sh/docs/kratos/guides/docker). If this is a third-party dependency, you may need to ensure that your build environment trusts the certificate authority used by code.dny.dev, or you may need to contact the maintainers of that dependency for further assistance.rough-kilobyte-98919
08/20/2025, 1:38 AMmake docker
command is missing VERSION arg, which is required during dockerbuild. what is the expected VERSION to be passed in?brief-egg-61061
08/20/2025, 1:38 AMbrief-egg-61061
08/20/2025, 1:38 AMrough-kilobyte-98919
08/20/2025, 1:42 AMmake docker
0.397 # <http://github.com/ory/kratos/embedx|github.com/ory/kratos/embedx>
0.397 embedx/embedx.go:99:17: undefined: configx.AddSchemaResources
brief-egg-61061
08/20/2025, 1:42 AMbrief-egg-61061
08/20/2025, 1:42 AMembedx/embedx.go:99:17: undefined: configx.AddSchemaResources
when running make docker
for Ory Kratos. The available sources discuss some common build issues (such as missing build contexts or problems with the make docker
process), but do not mention this particular undefined symbol or function [Error Running make docker
](https://github.com/ory/kratos/issues/4448). This error may be related to a mismatch between code and dependencies, or a recent change in the codebase. If you continue to encounter this issue, consider checking for open issues or discussions in the Ory Kratos repository, or reaching out to the maintainers for further assistance.rough-kilobyte-98919
08/20/2025, 3:43 AMbrief-egg-61061
08/20/2025, 3:43 AMbrief-egg-61061
08/20/2025, 3:43 AM--config
flag. For example: docker run -it -e DSN="memory" \ --mount type=bind,source="$(pwd)"/contrib/quickstart/kratos/email-password,target=/home/ory \ <your-local-image-name>:<tag> serve --config /home/ory/kratos.yml
Replace <your-local-image-name>:<tag>
with the name and tag of your locally built image. This example uses the quickstart configuration and runs Kratos with an in-memory database, which is suitable for local testing [Docker images](https://www.ory.sh/docs/kratos/guides/docker). 2. Check the logs for startup messages A healthy system will show log messages similar to: Starting the admin httpd on: 0.0.0.0:4434 Starting the public httpd on: 0.0.0.0:4433
This indicates that Kratos is running and listening on the expected ports [Clone Ory Kratos and run it in Docker](https://www.ory.sh/docs/kratos/quickstart#clone-ory-kratos-and-run-it-in-docker). 3. Verify the service is accessible You can test the public endpoint with a simple curl command: curl -I <http://127.0.0.1:4433/health/ready>
You should receive a response indicating the service is ready. If you encounter issues, double-check your configuration file and ensure required ports are available and not blocked by other services.rough-kilobyte-98919
08/20/2025, 5:38 AMidentity.schema.json: no such file or directory
brief-egg-61061
08/20/2025, 5:38 AMbrief-egg-61061
08/20/2025, 5:38 AMidentity.schema.json: no such file or directory
means that Ory Kratos cannot find the identity schema file at the path specified in your configuration. According to the official documentation, you need to ensure that: 1. The file exists at the correct path inside the container. For example, if your kratos.yml
configuration specifies: yaml identity: default_schema_id: default schemas: - id: default url: file:///opt/kratos/config/identity.schema.json
then the file must be available at /opt/kratos/config/identity.schema.json
inside the container. 2. You mount the directory containing identity.schema.json
into the container at the correct location. For local testing, you can use a bind mount. For example: sh docker run -it -e DSN="memory" \ --mount type=bind,source="$(pwd)"/contrib/quickstart/kratos/email-password,target=/opt/kratos/config \ <your-local-image-name>:<tag> serve --config /opt/kratos/config/kratos.yml
This command assumes both kratos.yml
and identity.schema.json
are in your local contrib/quickstart/kratos/email-password
directory and that your config references the schema at /opt/kratos/config/identity.schema.json
[Install Ory Kratos](https://www.ory.sh/docs/kratos/guides/deploy-kratos-example#install-ory-kratos). 3. The path in your configuration matches the mount point. Double-check that the url:
field in your config matches where the file will be inside the container. If you still see the error, verify the file exists in the mounted directory and that the mount is working as expected. You can also use docker exec
to open a shell in the running container and check the file path directly. If you follow these steps and ensure the file is present at the expected location, Kratos should be able to find and load your identity schema file.rough-kilobyte-98919
08/20/2025, 5:41 AMbrief-egg-61061
08/20/2025, 5:41 AMbrief-egg-61061
08/20/2025, 5:41 AMkratos serve
command, you can typically stop it by sending an interrupt signal (such as pressing Ctrl+C
in the terminal where it is running) or by terminating the process using standard operating system commands (e.g., kill
on Linux/macOS or Task Manager on Windows) [kratos serve](https://www.ory.sh/docs/kratos/cli/kratos-serve). If you are running Kratos as a systemd service, you can stop it with: systemctl stop kratos.service
as described in the systemd setup guide [Run Ory Kratos using systemd](https://www.ory.sh/docs/kratos/guides/deploy-kratos-example#run-ory-kratos-using-systemd). If you need more specific instructions for your environment, please provide additional details.rough-kilobyte-98919
08/20/2025, 6:20 AMbrief-egg-61061
08/20/2025, 6:20 AMbrief-egg-61061
08/20/2025, 6:20 AM400 Bad Request
status code even when a registration or login request is valid and an email (such as a registration or login code) is being sent. This behavior has been widely discussed and is recognized as confusing by many developers, as a 400
status code typically indicates a client error, not a successful operation like sending an email code. The reason for this is that, in the current flow model (v1), Kratos only returns a 200 OK
when the flow is fully completed (e.g., the user is registered or logged in). For intermediate steps—such as when a code is sent for email verification or passwordless login—a non-success code like 400
is returned, even though the request was processed and the email was sent. This is acknowledged as a point of frustration and confusion, and the maintainers have indicated that a more granular and appropriate use of status codes (such as 202 Accepted
for these cases) is planned for a future major version (v2), but not in the current version due to backward compatibility concerns [Requesting a login code returns HTTP 400](https://github.com/ory/kratos/issues/4052). In summary, the 400
response in this context does not mean the request failed; it is a known quirk of the current implementation. You should check the response body for further details, as the email is still being sent even when a 400
is returned. This behavior is expected to improve in future releases.rough-kilobyte-98919
08/20/2025, 6:26 AMSending out registration email with code.
, however I’m not receiving the code in my phone. is there any layer I can check what message body has been sent out?brief-egg-61061
08/20/2025, 6:26 AMbrief-egg-61061
08/20/2025, 6:27 AMregistration_code_valid
). For example, you might see log entries like: msg=Courier sent out mailer. ... message_template_type=registration_code_valid message_type=sms ...
This confirms that a message was sent, but the actual message body may not be shown in the logs for security reasons. If you need to see the exact message body, you may need to check your SMS provider's dashboard or logs, as Kratos sends the message body to the provider via HTTP API [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms). If you are using a custom SMS provider integration, you can also temporarily enable more verbose logging or inspect the outgoing HTTP requests to see the message content. In summary: - For emails: Use the Ory Console's Email Delivery dashboard. - For SMS: Check your Kratos logs for dispatch confirmation and your SMS provider for the actual message content. The message body itself is not directly shown in the Ory Console for SMS [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms) [Use a custom server to send Ory Identity messages to users](https://www.ory.sh/docs/kratos/emails-sms/sending-emails-smtp#troubleshooting).rough-kilobyte-98919
08/20/2025, 6:28 AMbrief-egg-61061
08/20/2025, 6:28 AMbrief-egg-61061
08/20/2025, 6:28 AMdebug
or trace
. This can be done by setting the LOG_LEVEL
environment variable or by configuring it in your configuration file: Using environment variable: sh export LOG_LEVEL=debug
or for even more detail: sh export LOG_LEVEL=trace
Using configuration file (kratos.yml
): yaml log: level: debug format: text leak_sensitive_values: false
After setting the log level to debug
or trace
, restart your Kratos service. The logs will now include more detailed information about internal operations, including outgoing HTTP requests to your SMS provider. For example, you may see log entries like: msg=Courier sent out mailer. ... message_template_type=registration_code_valid message_type=sms ...
and [DEBUG] POST <https://gate.smsaero.ru/v2/sms/send> ...
These entries confirm that a request was made to your SMS provider and may include additional context about the request [Logs and audit trails](https://www.ory.sh/docs/self-hosted/operations/logging#log-fields). Note: For security, the actual message body and sensitive values are redacted by default. If you need to see sensitive values (such as the message body), you can set: sh export LOG_LEAK_SENSITIVE_VALUES=true
or in your config: yaml log: leak_sensitive_values: true
Warning: Only enable leaking sensitive values in a secure, development environment, as this will expose personally identifiable information and secrets in your logs [Logs and audit trails](https://www.ory.sh/docs/self-hosted/operations/logging). This approach will help you inspect the outgoing HTTP requests and, if needed, the message content being sent to your SMS provider.rough-kilobyte-98919
08/20/2025, 6:50 AMbrief-egg-61061
08/20/2025, 6:50 AMbrief-egg-61061
08/20/2025, 6:51 AMurl
for your HTTP endpoint is correct. The configuration should look similar to: yaml courier: delivery_strategy: http http: request_config: url: <https://your-endpoint.example.com> method: POST body: <file://path/to/body.jsonnet> headers: Content-Type: application/json auth: type: basic_auth # or api_key, if needed config: user: your-username password: your-password
Double-check that the url
is reachable from the Kratos container or host and that there are no typos or network issues [HTTP based email delivery](https://www.ory.sh/docs/kratos/self-hosted/email-http#configuration). 2. Log Level and Debugging Increase the log level to debug
or trace
to see if Kratos is attempting to send the HTTP request. This can help you determine if the request is being made or if there is a configuration or runtime error preventing it [Logs and audit trails](https://www.ory.sh/docs/self-hosted/operations/logging#log-fields). 3. Error Handling If Kratos cannot reach your HTTP endpoint or encounters an error, it should log an error message. Check the logs for any errors related to HTTP delivery. If the logs only show the email being "sent" but no HTTP request, it may indicate a misconfiguration or that the delivery strategy is not set to HTTP. 4. Default Behavior If you see logs indicating "sending out registration email with code" but do not see HTTP requests, Kratos may still be using the default SMTP delivery strategy. Make sure you have updated the configuration and restarted Kratos with the correct settings [Send emails using an HTTP server](https://www.ory.sh/docs/kratos/emails-sms/sending-emails-smtp#send-emails-using-an-http-server). 5. Testing the Endpoint You can test your HTTP endpoint independently (e.g., with curl or Postman) to ensure it is reachable and accepting requests as expected. If after these checks your endpoint still does not receive requests, review the Kratos logs for any clues. If there are no errors and the configuration is correct, but the HTTP endpoint is not invoked, the knowledge sources do not provide further troubleshooting steps for this specific scenario. In that case, you may need to seek additional support from the Ory community.rough-kilobyte-98919
08/20/2025, 6:53 AMbrief-egg-61061
08/20/2025, 6:53 AMbrief-egg-61061
08/20/2025, 6:53 AMjson { "traits": { "phone": { "type": "string", "format": "tel", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "code": { "identifier": true, "via": "sms" } }, "recovery": { "via": "sms" }, "verification": { "via": "sms" } } } } }
This ensures Kratos knows to send codes via SMS for registration, recovery, and verification flows [Phone number and password](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#phone-number-and-password). 2. Configure the SMS delivery channel in your Kratos config. For example: yaml courier: channels: - id: sms type: http request_config: url: <https://api.twilio.com/2010-04-01/Accounts/AXXXXXXXXXXXXXX/Messages.json> method: POST body: <base64://ZnVuY3Rpb24oY3R4KSB7CiAgVG86IGN0eC5yZWNpcGllbnQsCiAgQm9keTogY3R4LmJvZHksCn0>= headers: Content-Type: application/x-www-form-urlencoded auth: type: basic_auth config: user: AXXXXXXX password: XXXX
Adjust the URL, credentials, and body template for your SMS provider [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms). 3. Restart Kratos after updating the configuration. 4. Test the registration flow using a phone number. Kratos should now send the registration code via SMS to the provided phone number. If you do not see SMS requests hitting your endpoint, double-check that: - The identity schema is correctly set up for SMS. - The courier channel for SMS is configured and enabled. - The phone number is provided in the registration flow. If you follow these steps, Kratos will send registration codes via SMS instead of email [Enable SMS one-time-code (OTP)](https://www.ory.sh/docs/kratos/passwordless/one-time-code#enable-sms-one-time-code-otp).rough-kilobyte-98919
08/20/2025, 6:58 AMbrief-egg-61061
08/20/2025, 6:58 AMbrief-egg-61061
08/20/2025, 6:58 AMSending out registration email with code
even though you want SMS, it strongly suggests that your identity schema and/or Kratos configuration is still set up to send registration codes via email, not SMS. Key things to check: 1. Identity Schema Configuration Your identity schema must specify that the registration code should be sent via SMS. The relevant trait (e.g., phone
or phone_number
) should have the following structure: json "phone": { "type": "string", "format": "tel", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "code": { "identifier": true, "via": "sms" } } } }
If the via
is set to "email"
, Kratos will send the code via email. If it is set to "sms"
, it will use SMS [Custom identity schema](https://www.ory.sh/docs/kratos/passwordless/one-time-code#custom-identity-schema) [Phone number and password](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#phone-number-and-password). 2. Registration Flow When registering, ensure you are using the phone number as the identifier, not the email. If you register with an email, Kratos will send the code to the email address. 3. Courier Channel Configuration Make sure the SMS channel is properly configured in your Kratos config, as described in the documentation [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms). Summary: If you see "registration email" in the logs, Kratos is using the email trait for code delivery. Double-check your identity schema and registration flow to ensure the code is set to be delivered via SMS and that you are registering with a phone number. If you still see email logs after these changes, the knowledge sources do not provide further troubleshooting steps for this specific scenario.rough-kilobyte-98919
08/20/2025, 7:00 AM{
"$id": "<https://github.com/ory/kratos/.schema/versions.config.schema.json>",
"$schema": "<http://json-schema.org/draft-07/schema#>",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"title": "E-Mail",
"type": "string",
"<http://ory.sh/kratos|ory.sh/kratos>": {
"credentials": {
"password": {
"identifier": true
}
},
"verification": {
"via": "email"
},
"recovery": {
"via": "email"
}
}
},
"username": {
"type": "string",
"minLength": 4,
"title": "Username",
"<http://ory.sh/kratos|ory.sh/kratos>": {
"credentials": {
"password": {
"identifier": true
}
}
}
},
"name": {
"type": "object",
"properties": {
"first": {
"title": "First name",
"type": "string"
},
"last": {
"title": "Last name",
"type": "string"
}
}
},
"phone": {
"title": "Phone number",
"type": "string",
"format": "tel",
"<http://ory.sh/kratos|ory.sh/kratos>": {
"credentials": {
"code": {
"identifier": true,
"via": "sms"
}
},
"verification": {
"via": "sms"
}
}
}
},
"additionalProperties": false
}
}
}
brief-egg-61061
08/20/2025, 7:00 AMbrief-egg-61061
08/20/2025, 7:00 AMphone
trait, but there are a few things to clarify based on the knowledge sources: 1. Trait Key for Ory Extension The key for the Ory extension should be "<http://ory.sh/kratos|ory.sh/kratos>"
(not <http://ory.sh/kratos|ory.sh/kratos>
). Using the wrong key will cause Kratos to ignore the configuration for that trait. 2. Schema Example Here is a corrected example based on the official documentation [Custom identity schema](https://www.ory.sh/docs/kratos/passwordless/one-time-code#custom-identity-schema): json { "$id": "<https://schemas.ory.sh/presets/kratos/identity.phone.schema.json>", "$schema": "<http://json-schema.org/draft-07/schema#>", "type": "object", "properties": { "traits": { "type": "object", "properties": { "email": { "title": "E-Mail", "type": "string", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "password": { "identifier": true } }, "verification": { "via": "email" }, "recovery": { "via": "email" } } }, "username": { "type": "string", "minLength": 4, "title": "Username", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "password": { "identifier": true } } } }, "name": { "type": "object", "properties": { "first": { "title": "First name", "type": "string" }, "last": { "title": "Last name", "type": "string" } } }, "phone": { "title": "Phone number", "type": "string", "format": "tel", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "code": { "identifier": true, "via": "sms" } }, "verification": { "via": "sms" } } } }, "additionalProperties": false } } }
3. What this does: - When a user registers with a phone number, Kratos will send a code via SMS (if your courier is configured for SMS). - If you register with an email, Kratos will send a code via email. 4. Next Steps: - Update your schema to use "<http://ory.sh/kratos|ory.sh/kratos>"
as the key. - Ensure your courier configuration is set up for SMS delivery as described in the documentation [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms). - Register using the phone number to trigger SMS code delivery. If you still see "Sending out registration email with code" in your logs after these changes, double-check that you are registering with the phone number and not the email, and that your courier SMS channel is correctly configured. References: - [Custom identity schema](https://www.ory.sh/docs/kratos/passwordless/one-time-code#custom-identity-schema) - [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms)rough-kilobyte-98919
08/20/2025, 7:04 AMbrief-egg-61061
08/20/2025, 7:04 AMbrief-egg-61061
08/20/2025, 7:04 AM"<http://ory.sh/kratos|ory.sh/kratos>"
as the key and set the phone
trait to deliver codes via SMS, but Kratos is still logging "Sending out registration email with code," there are a few things to consider based on the knowledge sources: 1. Registration Flow Input Kratos determines the delivery method based on the identifier used during registration. If you register with an email, it will send the code via email. If you register with a phone number, it should send the code via SMS, provided your schema and courier configuration are correct [Custom identity schema](https://www.ory.sh/docs/kratos/passwordless/one-time-code#custom-identity-schema). 2. Schema and Courier Configuration Double-check that: - The schema is loaded and active in your Kratos instance. - The courier SMS channel is configured and enabled as described in the documentation [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms). 3. Trait Used as Identifier The logs will show "registration email" if the registration flow is using the email trait as the identifier, even if the schema supports SMS for the phone trait. Make sure your registration request is using the phone number as the identifier. 4. No Further Troubleshooting in Knowledge Sources If you have confirmed all of the above and are still seeing email logs, the knowledge sources do not provide further troubleshooting steps for this specific scenario. There may be an issue with how the registration flow is being triggered or with the active schema in your Kratos deployment. Summary: - Ensure you are registering with the phone number, not the email. - Confirm your schema and courier SMS configuration are active and correct. - If the issue persists, the knowledge sources do not contain enough information to provide a definitive solution for this scenario.rough-kilobyte-98919
08/20/2025, 7:37 AMbrief-egg-61061
08/20/2025, 7:37 AMbrief-egg-61061
08/20/2025, 7:38 AM--watch-courier
flag to your kratos serve
command. This will ensure that the message queue is processed and SMS (or email) messages are sent out as expected [Mail courier in self-hosted Ory Kratos](https://www.ory.sh/docs/kratos/self-hosted/mail-courier-selfhosted). Example: sh kratos serve --config /path/to/kratos.yml --watch-courier
If you do not run the courier (either as a sidecar or with --watch-courier
), messages will remain in the queue and will not be delivered, so SMS will not work. In multi-instance setups, the courier should be run as a separate singleton process, but for local development, the --watch-courier
flag is sufficient [kratos serve](https://www.ory.sh/docs/kratos/cli/kratos-serve).rough-kilobyte-98919
08/20/2025, 7:39 AMbrief-egg-61061
08/20/2025, 7:39 AMbrief-egg-61061
08/20/2025, 7:40 AM--watch-courier
flag: sh kratos serve --config /path/to/kratos.yml --watch-courier
This is true regardless of whether you use the official image or a custom one. If you do not run the courier (either as a sidecar or with --watch-courier
), messages—including SMS—will not be sent out [Mail courier in self-hosted Ory Kratos](https://www.ory.sh/docs/kratos/self-hosted/mail-courier-selfhosted). In multi-instance or production setups, you should run the courier as a separate singleton process (sidecar or job). For local development and most custom images, using --watch-courier
is sufficient [kratos serve](https://www.ory.sh/docs/kratos/cli/kratos-serve).