quiet-painting-32952
03/19/2025, 9:49 PMbrief-egg-61061
03/19/2025, 9:49 PMbrief-egg-61061
03/19/2025, 9:50 PMory list workspaces ory list projects --workspace <workspace-id> ory get identity-config --project <project-id> --workspace <workspace-id> --format yaml > identity-config.yaml
2. Add the Gmail SMTP configuration to your identity-config.yaml
file: yaml courier: delivery_strategy: smtp smtp: connection_uri: <smtp://username:password@smtp.gmail.com:587/> from_address: <mailto:your-email@gmail.com|your-email@gmail.com> from_name: Your Name
3. Update your configuration: ory update identity-config --project <project-id> --workspace <workspace-id> --file identity-config.yaml
### Important Notes for Gmail 1. For the username and password in the connection URI, you need to URL-encode any special characters. For example, if your password contains special characters like /
or %
, you must encode them [as described in the troubleshooting guide](https://www.ory.sh/docs/troubleshooting/smtp-courier-OTA-112022-01). 2. For Gmail specifically, you'll likely need to use an "App Password" instead of your regular Gmail password. This requires: - Having 2-Step Verification enabled on your Google account - Generating an App Password specifically for Ory in your Google Account settings 3. Gmail uses StartTLS with certificate verification, which is the default security mechanism in the connection URI shown above. 4. You can verify your email configuration is working by checking the Monitoring → Email Delivery page in the [Ory Console](https://console.ory.sh/projects/current/email-delivery). If you encounter any issues with email delivery, check the Email Delivery dashboard in the Ory Console to see the specific error messages. Hope this helps you set up your Gmail SMTP configuration with Ory!quiet-painting-32952
03/19/2025, 9:51 PMbrief-egg-61061
03/19/2025, 9:51 PMbrief-egg-61061
03/19/2025, 9:51 PMlocal_name
configuration option. According to a reported issue in the Ory Network repository, this happens specifically with Google Workspace SMTP Relay on port 587 with StartTLS [as documented here](https://github.com/ory/network/issues/297). Some SMTP relays (like Gmail/Google Workspace) may close the connection when using generic identifiers like localhost
. The local_name
parameter allows you to specify a unique identifier for the HELO/EHLO command, which should usually be the domain name of the sending host. To fix this issue, you should add the local_name
parameter to your SMTP configuration: yaml courier: smtp: local_name: <http://your-domain.com|your-domain.com>
Where <http://your-domain.com|your-domain.com>
should be replaced with your actual domain name. Note that while this configuration option exists in self-hosted Ory Kratos [as documented here](https://www.ory.sh/docs/kratos/self-hosted/mail-courier-selfhosted), there was an issue reported that this setting might not persist when configured via the Ory CLI in the Ory Network. If you continue to experience issues, you might want to: 1. Check the [Email Delivery dashboard](https://console.ory.sh/projects/current/email-delivery) for more detailed error messages 2. Consider using a different SMTP provider temporarily 3. Ensure your Google Workspace SMTP settings are correctly configured to allow relay This is a known issue that the Ory team has acknowledged and is working to fix. Hope this helps resolve your EOF error!quiet-painting-32952
03/19/2025, 9:56 PMbrief-egg-61061
03/19/2025, 9:56 PMbrief-egg-61061
03/19/2025, 9:56 PMlocal_name
parameter for SMTP configuration in Ory Network. According to a GitHub issue, this parameter was not properly added to the revision rendering system, which means it might not persist when configured via the Ory CLI [as noted in this issue](https://github.com/ory/network/issues/297). Despite this limitation, you can try to set the local_name
parameter using the Ory CLI with the following steps: 1. First, get your current identity configuration: ory get identity-config --project <project-id> --workspace <workspace-id> --format yaml > identity-config.yaml
2. Add the local_name
parameter to your SMTP configuration in the YAML file: yaml courier: smtp: connection_uri: <smtp://username:password@server:port/> from_address: <mailto:your-email@domain.com|your-email@domain.com> from_name: Your Name local_name: <http://your-domain.com|your-domain.com>
3. Update your configuration: ory update identity-config --project <project-id> --workspace <workspace-id> --file identity-config.yaml
Alternatively, you can try using the patch command: ory patch project --project <project-id> --workspace <workspace-id> \ --replace '/services/identity/config/courier/smtp/local_name="<http://your-domain.com|your-domain.com>"'
However, be aware that as mentioned in the GitHub issue, a user reported that "the local_name setting doesn't stick when configured via the Ory CLI." This appears to be a known issue that the Ory team has acknowledged and is working to fix. If you continue to experience issues with the EOF error when using Google Workspace SMTP, you might need to consider using a different SMTP provider temporarily until this issue is resolved.quiet-painting-32952
03/19/2025, 10:23 PMbrief-egg-61061
03/19/2025, 10:23 PMbrief-egg-61061
03/19/2025, 10:23 PMory list workspaces ory list projects --workspace <workspace-id> ory get identity-config --project <project-id> --workspace <workspace-id> --format yaml > identity-config.yaml
2. Add the AWS SES SMTP configuration to your identity-config.yaml
file: yaml courier: delivery_strategy: smtp smtp: connection_uri: smtp://{smtp-user}:{smtp-password}@email-smtp.{region}.<http://amazonaws.com:587/|amazonaws.com:587/> from_address: <mailto:your-verified-email@example.com|your-verified-email@example.com> from_name: Your Name
3. Update your configuration: ory update identity-config --project <project-id> --workspace <workspace-id> --file identity-config.yaml
### Important Notes for AWS SES 1. Replace {smtp-user}
and {smtp-password}
with your AWS SES SMTP credentials (not your regular AWS credentials). You can generate these in the AWS SES console. 2. Replace {region}
with your AWS region (e.g., us-west-2, us-east-1). 3. Make sure to URL-encode any special characters in your username and password [as described in the troubleshooting guide](https://www.ory.sh/docs/troubleshooting/smtp-courier-OTA-112022-01). 4. The from_address
must be a verified email address or domain in AWS SES. 5. You can also add AWS SES specific SMTP headers for cross-account sending: yaml courier: smtp: headers: X-SES-SOURCE-ARN: arn:aws:ses:us-west-2:123456789012:identity/example.com X-SES-FROM-ARN: arn:aws:ses:us-west-2:123456789012:identity/example.com X-SES-RETURN-PATH-ARN: arn:aws:ses:us-west-2:123456789012:identity/example.com
You can verify your email configuration is working by checking the Monitoring → Email Delivery page in the [Ory Console](https://console.ory.sh/projects/current/email-delivery). [SMTP Integrations documentation](https://www.ory.sh/docs/kratos/emails-sms/sending-emails-smtp#smtp-integrations) provides this specific example for AWS SES: smtp://{smtp-user}:{smtp-password}@email-smtp.{region}.<http://amazonaws.com:587/|amazonaws.com:587/> For example: <smtp://theuser:thepassword@email-smtp.us-east-1.amazonaws.com:587/>
quiet-painting-32952
03/19/2025, 10:37 PMbrief-egg-61061
03/19/2025, 10:37 PMbrief-egg-61061
03/19/2025, 10:37 PMquiet-painting-32952
03/20/2025, 10:11 PMconst { data: flow } = await ory.createBrowserLogoutFlow()
// Use the received token to "update" the flow and thus perform the logout
await ory.updateLogoutFlow({
token: flow.logout_token,
})
return {
success: true,
redirectTo: '/'
}
How do I redirect the user to the ory experience login page?brief-egg-61061
03/20/2025, 10:11 PMbrief-egg-61061
03/20/2025, 10:11 PMjavascript const { data: flow } = await ory.createBrowserLogoutFlow() // Use the received token to "update" the flow and thus perform the logout await ory.updateLogoutFlow({ token: flow.logout_token, }) // Redirect to the Ory Account Experience login page window.location.href = "/.ory/ui/login"
The /.ory/ui/login
path is the standard path for the Ory Account Experience login page when using the [Ory Tunnel](https://www.ory.sh/docs/getting-started/integrate-auth/expressjs#require-login-to-access-the-home-page) or when the Account Experience is properly configured in your application. If you're using a custom domain or a different configuration, you might need to adjust the URL to something like: javascript // If using a project slug window.location.href = `https://${PROJECT_SLUG}.<http://projects.oryapis.com/ui/login|projects.oryapis.com/ui/login>` // Or if using a custom domain window.location.href = "<https://your-domain.com/ui/login>"
You can also use the return_to
parameter to specify where the user should be redirected after successful login: javascript window.location.href = "/.ory/ui/login?return_to=" + encodeURIComponent(window.location.origin + "/dashboard")
This approach is consistent with the examples shown in the [Express.js integration documentation](https://www.ory.sh/docs/getting-started/integrate-auth/expressjs#require-login-to-access-the-home-page) and the [React integration documentation](https://www.ory.sh/docs/getting-started/integrate-auth/react#require-login-to-access-the-app-page).