Unanswered: Redirecting back to "localhost" for natively compiled sencha touch app
Unanswered: Redirecting back to "localhost" for natively compiled sencha touch app
In a nutshell... for authentication that navigates away to a site and then return via a "return_uri" parameter what do you use for natively compiled web apps? (if even possible).
I've been using google app engine for authentication of my sencha touch app and it all works perfectly when running on localhost as well as via my online server in production. However when I compile it to a native version I am stumped at how to "redirect back" to my native app index.html when they log in.
I have tried a custom url scheme (myapp://return etc) but it is not "redirected" back to from the remote server. I've tried having the "thankyou" page at the end include a scheme link to the native app for people to click but that quits the application. Now i'm stumbling around hoping to get an iframe solution to work, listening to the page load event (but iframes seem to be a bit dodgy).
Google, oauth2, facebook, twitter - they all seem to require a "return to" url - so have no idea how people are doing this for sencha native apps?
Cheers very much for the response. I don't however think I am able to do oauth without a url redirect (at least not with google app engine behind the scenes)
What I ended up coming up is still using the url scheme myapp://etc but first calling Ext.device.Device.openURL to open the oauth window in safari (which I hadn't tried)... then on the final page I have a button that re-opens the native app and passes in the oauth token details. Works quite nicely now - native app just sits and waits for the device's scheme update event and takes it from there.
I'd be worried about user experience. You need a way for native apps to do this. For example, Facebook has a different way for native apps to do their auth.