On webapps, hybrid apps and Azure Active Directory ADAL


#1

Continuing the discussion from Anyone creating a PWA and authenticating using Azure Active Directory ADAL?:

Hi Mike @mdlallemont, I did not want to pollute other threads, but I wanted to ask.

You mention you ended up using ms-adal, and in this other thread, you mention that you used Ionic for building a webapp + a mobile app, here:

Now, I am trying to build a webapp with Ionic and tried using the ms-adal Ionic component. Since it’s a Cordova plugin, I think, when I tried running my webapp with ionic serve, it fails to load on the browser, hence I believe now I can’t use it:
image
That above is using the usage code in ms-adal.

Here is my question: when you said that you were doing that webapp+mobile app in Ionic, did you use adal auth there?
If so, were you able to use ms-adal for the webapp? Is there a trick to load a cordoba plugin in the browser or in the case of a webapp one should use the azure activedirectory library for js - since “ADAL also provides an AngularJS wrapper as adal-angular.js”:

Thanks a ton Mike and anyone that has ideas/opinions on this,
Gustavo.


#2

Where did you net out with this? I’m trying the same thing.


#3

Hi J,

Mike was very nice in providing me with the code to authenticate a user from a web app in Ionic.
Is this something you would be interested in having?
thanks,
Gustavo.


#4

Yes please! That would be great.


#5

So, can I haz it? Or shuld I talk to mike?

Thanks!


#6

Hi,

here you go:
https://drive.google.com/open?id=1YjljMV-7JPWtjBV4P1HbfcnhG7sCKASE

on Mike’s words:
This is a hybrid PWA so it has both Cordova based auth and web only auth. You’ll see a function where it decides based on how it is running.

Let me know how it goes!
Gustavo.


#7

i can’t seem to get to this to download


#8

Hey, I do not know why that would be. I was able to download it just now, using a Private/Incognito browser…