Anyone creating a PWA and authenticating using Azure Active Directory ADAL?

I appreciate the response and I had tried that with no luck. I created a completely blank project and have the following in my app.module.ts and receive the

Runtime Error
Cannot find module “adal”

///<reference path="../../node_modules/ng2-adal/ts/adal/index.d.ts"/>

import { NgModule, ErrorHandler } from ‘@angular/core’;
import { IonicApp, IonicModule, IonicErrorHandler } from ‘ionic-angular’;
import { MyApp } from ‘./app.component’;
import { HomePage } from ‘…/pages/home/home’;
import {AdalService} from ‘ng2-adal/core’;

@NgModule({
declarations: [
MyApp,
HomePage
],
imports: [
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage
],
providers: [AdalService, { provide: ErrorHandler, useClass: IonicErrorHandler },]
})
export class AppModule {}

In Ionic, do you have to engage the path location strategy for this to work with NG2-ADAL?

Yes I did. The reason is if you look at the adal.js library it is hard coded to look for the hash “#”.

Hey Mike,
may I ask why did you use this library and not the one from microsoft here?
Thanks!
Gustavo.

I did end up using ms-adal. Currently I have no issues.

1 Like