rough-airplane-18783
03/25/2025, 7:09 AMbrief-egg-61061
03/25/2025, 7:09 AMbrief-egg-61061
03/25/2025, 7:09 AMrough-airplane-18783
03/26/2025, 7:13 AMbrief-egg-61061
03/26/2025, 7:13 AMbrief-egg-61061
03/26/2025, 7:13 AMyaml selfservice: flows: registration: after: default_browser_return_url: <https://end-up-here-after-registration/> webauthn: # For passkeys/WebAuthn default_browser_return_url: <https://end-up-here-after-registration-with-passkey/>
This allows you to specify a different redirect URL specifically for passkey registrations compared to other methods like password or OIDC [Redirect Flows](https://www.ory.sh/docs/concepts/redirects#redirect-flows). ### 2. Using Return To Parameter You can also dynamically specify a redirect URL by appending a return_to
query parameter when initializing the registration flow: <https://your-ory-project.projects.oryapis.com/self-service/registration/browser?return_to=https://your-app.com/welcome>
For this to work, you need to whitelist the domain in your Ory configuration: yaml selfservice: allowed_return_urls: - <https://your-app.com/>
This prevents open redirect attacks while allowing dynamic redirects [HTTP redirection configuration](https://www.ory.sh/docs/kratos/concepts/browser-redirect-flow-completion). ### 3. Auto-Login After Registration If you want users to be automatically logged in after registration with passkey, you can enable this feature: 1. Go to Authentication → Registration in the Ory Console 2. Toggle Sign In After Registration This will create a session for users immediately after registration, allowing them to access protected resources without having to log in again [Log in users after registration](https://www.ory.sh/docs/identities/sign-in/actions#log-in-users-after-registration). Remember that these redirect configurations work differently for browser-based flows versus API/SPA clients, with the former using HTTP redirects and the latter receiving JSON responses.