AzureAD / microsoft-authentication-library-for-js

Microsoft Authentication Library (MSAL) for JS
http://aka.ms/aadv2
MIT License
3.68k stars 2.65k forks source link

MSAL 2.0, msal-browser 2.9.0, PublicClientApplication is not implementing setActiveAccount and getActiveAccount methods from interface IPublicClientApplication #2900

Closed Hamedfal closed 3 years ago

Hamedfal commented 3 years ago

Library

Framework

Description

Recent update of msal-browser (2.9.0) fixed could of errors, but is missing the implementation of setActiveAccount and getActiveAccount methods.

Identity Provider

Browsers/Environment

zebslc commented 3 years ago

This occurs within the angular samples too. To replicate just clone the angular 10 or 11 projects in https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v2-samples/angular11-sample-app then run npm i and look at home.component.ts which shows the following.

image

jo-arroyo commented 3 years ago

@Hamedfal @zebslc Can you try reinstalling npm install @azure/msal-browser @azure/msal-angular. We will make sure to update our samples so this no longer occurs.

zebslc commented 3 years ago

Hi, this is still occurring - I uninstalled those two libraries first then re-installed and the same thing happens. Is there an interim fix or workaround for these as currently they are both broken?

I am trying to evaluate this library atm as MSAL 2 is recommended by your documentation here:- https://docs.microsoft.com/en-gb/azure/active-directory/develop/scenario-spa-app-registration#redirect-uri-msaljs-20-with-auth-code-flow

image

zebslc commented 3 years ago

Sorry, just noticed you had the PR there too so I have manually incorporated those changes in my sample :-)

Hamedfal commented 3 years ago

@Hamedfal @zebslc Can you try reinstalling npm install @azure/msal-browser @azure/msal-angular. We will make sure to update our samples so this no longer occurs.

Thank you very much. It is working now.

Hamedfal commented 3 years ago

issue resolved