Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to AuthenticationContext breaks other packages that depend on angular-adal #122

Open
MobesE46 opened this issue Apr 30, 2019 · 1 comment

Comments

@MobesE46
Copy link

I'm trying to implement both angular-adal4 and azure-maps-control, both of which depend on angular-adal. I had angular-adal4 implemented and working fine, but when I tried to start using azure-maps-control package, it started throwing compile errors:

"Cannot use namespace 'AuthenticationContext' as a type."

These errors are on line 3189 and 3203 of \node_modules\azure-maps-control\typings\index.d.ts

authContext?: AuthenticationContext;

setAadProperties?(clientId: string, aadAppId: string, aadTenant: string, aadInstance?: string, authContext?: AuthenticationContext): void;

I think what's causing the problem in angular-adal4 is this from adal-angular.d.ts.

// Typings needed for using ADAL with Angular 4
declare module 'adal-angular' {
    export function inject(config: adal.Config): adal.AuthenticationContext;

    export class adal{
        
    }
}

I think this is redefining the adal-angular AuthenticationContext to be a namespace instead of a class. The azure-map-control typings file is importing adal-angular like this:

import * as AuthenticationContext from "adal-angular";

If I go an manually update their typing file to AuthenticationContext.adal, it's happy and all works fine. But that obviously isn't a solution. I tried to see if I could fork their code, but it's not on github. The only option I see is to either modify how adal-angular4 works, or use a different adal-angular wrapper.

@bpanhale
Copy link

bpanhale commented Oct 26, 2020

I am facing same issue, Did you find any solution on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants