Phoenix: How to redirect to external custom URI scheme? redirect(external: "custom://my.custom.uri")

How to redirect to external custom URI scheme?

redirect(external: “custom://my.custom.uri”) doesnt work…

Hmm, never tried a custom scheme but they are definitely necessary at many times… What is the error that you get? What are the returned headers and body? Etc…?

So far, there is no error. It is just not redirecting, and seems like the conn’s chaining process is stopped.

I am not sure on how to get the returned headers and body, do you mean inspecting the resulting conn? It is quite long and after some lines, it is truncated.

I mean like if you are using Chrome (similar in firefox/edge/ie/, no clue about safari) just bring up the network inspector, go to the link that redirects you, and click the connection in the network to see what all the information was. Or if you have a link that we can try ourselves then we can check. Also make sure the browser you are using allows for the schema that you are trying for.

This is it, when I try using Safari, it redirects me good. I was using Chrome before. Also worth noting that Firefox also failed to redirect. Those are three browsers that I have installed on my mac.

Because my purpose to do this is for OAuth redirection on iOS app using its Safari, so I need to test it on iOS’s Safari then, and will update you again.


Just some quick references: