billions-minister-2901
04/01/2025, 2:44 PMbrief-egg-61061
04/01/2025, 2:44 PMbrief-egg-61061
04/01/2025, 2:45 PMory tunnel --project <project-id> --workspace <workspace-id> <http://localhost:3000>
This command creates a connection between your local environment and Ory Network, allowing you to test your hooks locally. [Ory Proxy and Ory Tunnel](https://www.ory.sh/docs/guides/cli/proxy-and-tunnel) ## Testing password migration hooks If you're specifically testing a password migration hook: 1. Import identities with use_password_migration_hook
set to true
2. Configure the password migration webhook to point to your local server 3. Implement the webhook to handle the password migration logic 4. Test the login flow to trigger the hook [Password migration using a web hook](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#password-migration-using-a-web-hook) ## Testing with custom UI When testing hooks with a custom UI: 1. Configure Ory Network to use UI views hosted on your local machine 2. Use Ory Tunnel to create a connection between your local environment and Ory Network 3. Run your local application and test the flows that trigger your hooks [Configure Ory to use your UI](https://www.ory.sh/docs/kratos/bring-your-own-ui/configure-ory-to-use-your-ui#development) ## Canceling webhooks during testing For testing purposes, you can also implement logic to cancel webhooks for test accounts: function(ctx) if std.startsWith(ctx.identity.traits.email, "test-") then error "cancel" else { user_id: ctx.identity.id }
This prevents test accounts from triggering actual external integrations during testing. [Canceling webhooks](https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#canceling-webhooks) Remember that Ory Tunnel and Ory Proxy are meant for local development and should not be used in production environments.billions-minister-2901
04/01/2025, 2:47 PMbrief-egg-61061
04/01/2025, 2:47 PMbrief-egg-61061
04/01/2025, 2:47 PMory tunnel --project <project-id> <http://localhost:3000>
[Ory Tunnel](https://www.ory.sh/docs/cli/ory-tunnel#ory-tunnel) - Ory Proxy: ory proxy --project <project-id> <http://localhost:3000>
[Ory Proxy](https://www.ory.sh/docs/cli/ory-proxy#ory-proxy) 2. When using Ory Proxy, APIs are available under the /.ory
prefix, for example: https://<proxy-host>/.ory/ui/login
[Ory Proxy and Ory Tunnel](https://www.ory.sh/docs/guides/cli/proxy-and-tunnel#ory-proxy) 3. For production environments, you can use custom domains with CNAME records [Ory Proxy and Ory Tunnel](https://www.ory.sh/docs/guides/cli/proxy-and-tunnel#ory-proxy) If you could provide more details about your specific use case or what you're trying to accomplish, I'd be happy to provide more targeted assistance.magnificent-energy-493
billions-minister-2901
04/01/2025, 4:39 PMbillions-minister-2901
04/01/2025, 4:42 PMmagnificent-energy-493
billions-minister-2901
04/01/2025, 8:11 PMbillions-minister-2901
04/01/2025, 8:11 PMmagnificent-energy-493
pre-registration hookas far as I understand this calls from Ory Network to some url - what is running locally in this example?
magnificent-energy-493
billions-minister-2901
04/01/2025, 8:26 PMbillions-minister-2901
04/01/2025, 8:27 PMmagnificent-energy-493
magnificent-energy-493
billions-minister-2901
04/01/2025, 8:40 PMmagnificent-energy-493
billions-minister-2901
04/01/2025, 9:15 PMbillions-minister-2901
04/01/2025, 9:15 PMbillions-minister-2901
04/01/2025, 9:15 PM