<@U04UQ68083H> Can i configure two rp.id like <exa...
# ory-copilot
r
@chilly-king-10285 Can i configure two rp.id like example.com and example1.com to run this on 2 different domain methods: passkey: enabled: true config: rp: display_name: Example id: example.com origins: - https://ci.auth.example1.com - https://ci.iam.auth.example1.com - https://ci.api.auth.example1.com - https://darktheme-barsys.example.com - http://localhost:3000 - https://*.example.com
b
A message from kapa.ai
New message text here
r
@chilly-king-10285 After registration with passkey can i redirect to different success url
b
A message from kapa.ai
Yes, you can redirect users to a different success URL after registration with passkey. Ory provides several ways to configure post-registration redirects: ## Configuration Options ### 1. Using Configuration Settings You can configure different redirect URLs based on the authentication method used:
Copy code
yaml 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:
Copy code
<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:
Copy code
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 AuthenticationRegistration 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.