AzureAD / azure-activedirectory-library-for-cordova

ADAL for Cordova
59 stars 112 forks source link

Can we integrate Azure AD authentication and B2C authentication cordova plugin in single app #182

Open vaibhav915 opened 6 years ago

vaibhav915 commented 6 years ago

I want to integrate Azure AD authentication plugin (cordova plugin add cordova-plugin-ms-adal) and Azure B2C authentication plugin (cordova plugin add https://github.com/jospete/azure-activedirectory-library-for-cordova) in single app on Login screen.

Issue: If I use only B2C plugin then I stops sending Tenant Id in response for AD applications where as for B2C app it sends Tenant Id and other parameters like token, expiry.

Please suggest, Thanks in advance,

kabaehr commented 6 years ago

Did you found a solution?

vaibhav915 commented 6 years ago

@kabaehr : What is your requirement, because there is no specific solution rather work around are there.

kabaehr commented 6 years ago

I have a cordova app that we also use in the browser (without cordova not the browser platform of cordova) . For the browser application we are using msal, for the cordova app we used "https://github.com/jospete/azure-activedirectory-library-for-cordova" but the silent authentication is not working. I am now thinking about implementing the whole authentication flow with SafariViewController (https://medium.com/@jlchereau/stop-using-inappbrowser-for-your-cordova-phonegap-oauth-flow-a806b61a2dc5) and msal, but I might have to fork msal in order to not implement all the token parsing etc myself... We are using Azure b2C implicit flow (for the browser SPA version of our application)