How to allow custom url schemes?
# talk-kratos
c
How to allow custom url schemes?
p
Hi @cuddly-plastic-72839 What is the use case? with native apps you do not need redirects since the flows don't use a browser.
c
Hi @proud-plumber-24205 Thank you for your response! So maybe I understood the
return_to
query parameter wrong. How to specify, where to return to, after social login (e.g. via Google) has succeeded? 1. Create Registration Flow for Native Apps 2. Update Registration Flow with
return_to
3. Open a browser with the provided URL for signing in via social login provider 4. After successful authentication with the social login provider call back to
return_to
Related to this: How to configure where to return to in case of an error?
p
ah i see, that makes sense. In the native app social sign in documentation it describes using a normal callback URL on localhost https://www.ory.sh/docs/kratos/social-signin/native-apps
maybe it is possible to do the same in your native application?
c
In the documentation you linked
return_to
is also mentioned. I don't know how the normal callback URL would work? Besides the native app, we also have a self service browser client, which needs to work along. If I configure the "normal" return urls to the native app, the browser UI will stop working.
p
Yes, but what i meant was, maybe there is a possibility to have the native app use an http scheme on localhost instead of a custom scheme. Then you can just add this URL to the allowed return_to list.
We could also open up a feature request for this to work properly. Would you mind opening an issue here https://github.com/ory/network/issues/new/choose
c
In some circumstances we would have collisions if we use http urls. The result of this, that we can only use a self-hosted instance of Kratos and actually cannot migrate any project to SaaS.
Related to this: How to configure where to return to in case of an error?
Should I open a bug report in Kratos for this?
return_to
doesn't work in the case an error happens, for example when already an account exists with the unique identifier.
p
Thank you for the issue 🙂 Yes you can open it in Kratos
c
Great 🙂 And I'm also looking forward for the Email / SMS OTP feature coming out so we finally can retire our custom builds and start to migrate to your SaaS 🙂
I've created the bug report here https://github.com/ory/kratos/issues/3420
p
great thank you 🙂