Link to Ionic page from external website - hyperlink

I'm integrating an Ionic app with a 3rd party web authentication framework. The framework requires that the user visit a web page to authenticate and then receive several authentication token cookies.
I plan to open a link to the external login page, have the user authenticate, and then be redirected back to the Ionic app.
I need a URL to the homepage of my app so that the login page can redirect the user back after logging in. How do I generate a a URL for a location in the Ionic app?

why not just use the in app browsers plugin so that the user never has to leave the app in the first place.
https://github.com/apache/cordova-plugin-inappbrowser
Our app has a blog and we use this
$scope.readMore = function (index) {
$scope.link = $scope.articles[index].WebLink;
window.open($scope.link, '_blank', 'transitionstyle=crossdissolve,toolbarposition=top');
};
by using the option _blank we can have the user open up a webpage inside the app not have to have the navigate away from the app in order to access a url, i also looks way better than a iframe.

Related

iOS app using OAuth2 with Google and Safari presents open page dialog

I have finally got my iPhone app to authenticate and return back to my app with the authorisation code. The main problem was that the reverse client id did not get picked up by my app. I had to add an url scheme of my bundle id instead of the reverse client id.
Anywho, the problem is post authenticating in Safari I am presented with a open 'app name' page dialog. If the user clicks open it works fine. If they leave it for just a few seconds it redirects them to the Google homepage and they have to start all over again. If they are using two factor authentication by any other method than phone call I think it fails too.
How can I avoid this open page dialog?
The solution I found was to use the official Google library for iOS. This does not involve Safari like the AeroGear library I was using does.

Implementing Facebook Login with conditional redirection in iOS SDK

I have a requirement to integrate facebook login in my iOS app, everything is fine according to the instructions given at the below link
https://developers.facebook.com/docs/ios/getting-started
However I have a scenario where I need to implement a conditional redirection for facebook, such as
if (User is Not Logged In)
{
Then redirect to The Installed Facebook application and Get the details of user from the Facebook Application
}
else
{
// If user is logged in
Then Open a Webview to Enter Login
Credentials
}
my problem is due to placing the URL Schemes under URL types in info.plist I can open it in only one manner across the application,
Either I place The facebookId URL schema as the First Object and open the Installed facebook app, or Place it as second Object to open a Webview
Is there any way possible where I can check if the user is logged in then place the URL Schema at the top and not make it fallback to webview, but if not I Change it to be the first object in URL Types so it open the installed Facebook Application for Login

Build web page request in Objective C

I'm building a native application. The app has an embedded webview (UIWebView) pointing to a social website. To be able to use the website inside the app, user has to log in by the webview (username/password) and then he can continue use the site with saved cookies. Normally, the cookies expire after two days. After that, the user has to re-login by the webview.
Now suppose I know username and password of the user and I would like to make the user login automatically with this account when the cookie expires. How can I do that?
I tried to simulate the Login action when I click on Login button on web page, but not successful.By using "Inspect Element" of Chrome, I can see Chrome makes a "Post" request to an URL with some parameters. However, the request doesn't get successful (I use REST client for testing).
Finally I found out the solution. I didn't build requests anymore. I used javascript to set text fields and make "click" action on the webview. Done.

Facebook login doesn't work inside Twitter iOS App

I have a RoR / JQuery Mobile app that uses Facebook OAuth for authentication. It all works fine when accessing it via any normal browser on desktop and mobile with one exception.
If a user clicks a link to the app within the Twitter iOS app the home page loads within an internal webview. If the user then clicks 'Sign In with Facebook' the authentication seems to be successful but when Facebook redirects the user back to the app the page never loads. It just displays a blank page and the network indicator at the top of the screen just keeps spinning. If I close the web view and click the link again the page loads fine because the user has already authenticated.
Has any one else had problems with Facebook Auth inside the twitter app on iOS? Any suggestions on how I can resolve this problem? Is it possible this is just a bug with the Twitter app on iOS?
Thanks
I believe I found the solution. The facebook authentication process used a lot of redirects which I thought could be causing the problem (5 in total). After reviewing the process I realised I could remove one of the redirects and take the user directly to the page I wanted once they were authenticated.
www.example.com (link from the tweet)
www.example.com/auth/facebook (use clicks 'Login with Facebook')
1 - Redirect to: graph.facebook.com/oauth/authorize
2 - Redirect to: www.facebook.com/dialog/oauth
3 - Redirect to: www.example.com/auth/callback
4 - Redirect to: www.example.com/entry_path (This has now been removed)
5 - Redirect to: www.example.com/final_logged_in_path
The login process now works from within the Twitter iOS App.

How do I prevent the facebook login page from taking over my home page app?

I have a iPad home page app that I'm trying to integrate a facebook like button. Everything works fine if the user is already logged in, but if the user is not logged in the facebook login page takes over my app page and after login does not return to my app. Is there a way to make facebook login using an iframe?
My app is a web app not a native IOS app. It is setup with a manifest file and the user adds it to their home page. Because the app can have different URLs and all we want to do is provide like functionality, registering the app is not available to me.
What I want to know is there a way for facebook to open the login page in an iframe like the like dialog when the user clicks the like button? Right now I'm using the social plugin for the like button, but if the user isn't logged in to facebook the login page replaces my web app. Is there a way to make the login page use an iframe?
Wrapping it in a <div> worked for me

Resources