Reputation: 5430
Is there any working npm package for ADAL and Angular 5 (AOT build)?
I did try few, but everyone had some problems.
adal-angular4plus
ERROR in node_modules/adal-angular4plus/adal4.service.d.ts(40,25): error TS2503: Cannot find namespace 'adal'. node_modules/adal-angular4plus/adal4.service.d.ts(48,22): error TS2503: Cannot find namespace 'adal'. Installing
@types/adal-angular
nor@types/adal
helped.
ng2-adal
Did not work in AOT
ng2-adal-aot
acquireToken()
after injecting the iframe it refreshes automatically theappModule
. Hard to explain. But imagine the situation where you do a http request in ngOnInit of a component which is hosrted by appModule and there is a httpInterceptor which calls insideacquireToken()
- the appModule gets refreshed so it is neverending cycle.
Upvotes: 2
Views: 1416
Reputation: 11
You may also want to check adal-angular5, an Active Directory Authentication Library (ADAL) wrapper package for Angular 5. Uses HttpClient and HttpClientModule.
A working example using adal-angular5.
Upvotes: -1
Reputation: 131
Have you checked the ezcode-adal-angular5? This component:
you can also check a sample from https://github.com/frankchen76/EZCode-Adal-Angular5-Sample
Upvotes: 1
Reputation: 1105
In order to have adal-angular4plus work, add import { adal } from 'adal-angular';
in the .ts file where you define your configuration.
Upvotes: 1