AzureAD / azure-activedirectory-library-for-js

The code for ADAL.js and ADAL Angular has been moved to the MSAL.js repo. Please open any issues or PRs at the link below.
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/maintenance/adal-angular
Apache License 2.0
627 stars 372 forks source link

AdalAngular module not found - AngularJs 1.5 + Webpack 2 #884

Closed ssumit closed 4 years ago

ssumit commented 5 years ago

I tried npm install adal-angular I'm on webpack 2.7.0, angularjs 1.5.11 and adal-angular 1.0.17.

I'm trying to use it in app.js like:

import 'adal-angular'; .... export default angular.module('demoApp', ['otherModule', 'AdalAngular']);

No extra code from adal is being referenced and used.

However, I get error: 0: [$injector:modulerr] Failed to instantiate module demoApp due to: Error: [$injector:modulerr] Failed to instantiate module AdalAngular due to: Error: [$injector:nomod] Module 'AdalAngular' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

Is there any extra setting or config needed ? I have like 10 other modules that I can use successfully. The node-modules of course have one folder for adal after npm install.

jmckennon commented 4 years ago

Following the wiki, can you try import * as AuthenticationContext from 'adal-angular/lib/adal' when you want to use the library?

I'm mostly looking for more context here, as it looks like some of your naming conventions are off. AdalAngular doesn't seem to be declared anywhere specifically as AdalAngular, which is likely why you're seeing this error.

Additionally, all current authentication work from Microsoft is delivered through the msal js library here. adal js is still supported only for security fixes. We recommend moving to msal js for any advanced feature requests and bugfixes.

jmckennon commented 4 years ago

Closing this as we're assuming this is no longer an issue. We recommend that everyone switch to msal js here for advanced features and bugfixes.