Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication not work with Windows Phone 8.1 (universal) #1

Open
nhat-tong opened this issue May 27, 2015 · 3 comments
Open

Authentication not work with Windows Phone 8.1 (universal) #1

nhat-tong opened this issue May 27, 2015 · 3 comments

Comments

@nhat-tong
Copy link

Hi Adrianchia,

I'am a newbie on development the applications with Cordova. So, I'm really happy when i found your work with the problem of auth-dialog and in app browser for authenticate with ADFS. Today, I deploy my application on Windows Phone 8.1 (universal) simulator for tester. Unfortunately, the authentication did'nt work. I received 401 error unauthoried comme beginning.

So, can you tell me how to fix this prob in Windows Phone Universal, please ?

Thanks so much,

Nhat

@adrianchia
Copy link
Owner

Hi Nhat,

I don't have Windows 8.1 development environment so I can't tell you for sure, but basically it drills down to whether

  1. cordova-wp8 supports auth dialog supports auth dialog for Windows Universal app
  2. cordova-inapp-browser plugin supports auth dialog for Windows Universal app

Edit: 1 should be cordova-windows instead of wp8

@nhat-tong
Copy link
Author

Hi Adrianchia,

Thanks for your anwser. But when I installed cordova-inapp-browser, the pop-up ADFS for username/pass didn't display any more on Android. I had also 401 error unauthorized (it worked well with your custom plugin). I think that InAppBrowser of cordova didn't support yet auth-dialog plugin.

More information, your custom plugin resolved my problem of redirection with ADFS on Android (I just installed two plugins as you proprosed). When the redirection ADFS returned, it called auth-dialog plugin for display the pop-up username/pass.
Unfortunately, this behavior did'nt work with Windows Phone 8 (I tested on simulator and on device) and Windows Phone 8.1. I hadn't an iPhone for verify this behavior.

I try to read your InAppBrowser custom plugin code but I didn't found the code which call auth-dialog when the redirection ADFS returned. I wanna to extend this plugin for support Windows Phone 8 and Windows 8.1.

Call you help me, please ?

Thank you,

Nhat

@adrianchia
Copy link
Owner

Yes, the current InAppBrowser plugin does not yet. This is mentioned in Cordova's Issue Tracking System https://issues.apache.org/jira/browse/CB-8534 and also apache/cordova-plugin-inappbrowser#82. The reason why it worked in Android with Custom Code is that Cordova-Android has added support for auth dialog, which is based on Android WebView (see here). This allows plugins to implement auth dialogs. I am not sure about how Windows Universal App does this but it could break down into several scenarios:

  1. Can a native Windows Universal App access a page secured by ADFS with an auth dialog (without cordova)? Note that you may have to implement the auth dialog yourself, the other way to put this is does it support any way to add a listener / handler so that you can implement an auth dialog?
  2. If 1 is possible, can cordova-windows support the same mechanism?
  3. If 2 is also possible it is most likely that cordova-inapp-browser needs to add support for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants