Comments (10)
I think, after successful authentication, you have to hit your url through inappbrowser in ios.
from cordova-plugin-auth-dialog.
Actually I just used Fiddler to intercept the request. I can see that the required cookies are not set when I open the website in the iframe after authenticating.
from cordova-plugin-auth-dialog.
so, whats ur issue ?
from cordova-plugin-auth-dialog.
The user is not authenticated in the frame because the authentication cookies are not set in the frame.
More precisely, the issue occurs with a site that uses a STS. After the STS has authenticated the user, the server responds with a HTML page that contains a form with the user claims. That form normally gets posted back to the website using JavaScript, which then sets the required cookies.
This works well in Safari on iOS. It doesn't work with the plugin on the app. The reason I believe is that the STS requires that the HTML response is actually run to complete the authentication.
from cordova-plugin-auth-dialog.
@gfox1984 , what i implemented was, having a http url having ntlm authentication protection in it, so by using this plugin, after successful authentication, i opened the url via inappbrowser in ios app, and it worked.
Test url for http authentication.
http://httpbin.org/basic-auth/user/passwd
So, after authDialog.authenticate , you should try to open your STS url again.
it will not automatically open the url for us.
Try and let me know, if possible can you provide the STS url for testing.
from cordova-plugin-auth-dialog.
@gfox1984 , i am also facing same issue, can you please send me how to implement this
from cordova-plugin-auth-dialog.
@pallaviMN After authenticating, simply navigate to your site in the frame and it should work. We actually had a bug in our STS which was crashing due to bad cookies.
from cordova-plugin-auth-dialog.
i wanted to know, how to call the plugin in android & its not calling "willSendRequestForAuthenticationChallenge" in iOS
from cordova-plugin-auth-dialog.
@pallaviMN on Android you cannot and you don't need to call the "authDialog.authenticate". When first accessing a page which requires Basic/Digest/NTML authentication, the authentication popup will automatically show.
I'm not sure about "willSendRequestForAuthenticationChallenge" in iOS.
PS: beware than iOS caches your credentials. So if you've entered them once, you won't be able to reenter them and go through authentication. This could be why you seem not to be re-authenticating in your app. To force reauthentication, you can use the Phonegap-Cookies-Plugin to clear the cookies, combined with the undocumented "authDialog.logout()" method. Below is an example that ensures a clean logout:
// Clear authentication settings
if (typeof authDialog !== "undefined")
authDialog.logout();
// Clear any residual cookies
window.cookies.clear(function () {
// Redirect to the login page
})
});
from cordova-plugin-auth-dialog.
There is no logout method for this version of the plugin. Some people have worked on stuff like that though:
from cordova-plugin-auth-dialog.
Related Issues (16)
- clear saved credentials HOT 1
- Looking for help with this plugin HOT 3
- Not working on latest IOS? HOT 1
- Forks are more advanced
- Need help to save credentials.
- How to observe success or error callbacks for windows authentication in Android?
- How to know given URL has Windows Authentication enabled or not?
- Not working in Windows 10
- This plugin do not work
- Support with inAppBrowser
- Support auth-dialog with inAppBrowser HOT 2
- compile fix... HOT 1
- how to add auto save?
- Logout/Clear cached credentials HOT 6
- auth dialog on android HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-auth-dialog.