1

i tried to import Msal into a reactjs app. As the app is create by create-react-app we have no webpack loader in the project itself. I can not get a reference to Msal. tried:

var Msal = require('msal/out/msal.js');
var Msal = require('msal');
import Msal from 'msal';
import {Msal} from 'msal';

There is always an empty Msal without the constructor for creating the connector.

var userAgentApplication = new **Msal**.UserAgentApplication("your_client_id", null, function (errorDes, token, error, tokenType) {
              // this callback is called after loginRedirect OR acquireTokenRedirect (not used for loginPopup/aquireTokenPopup)
        })
Timo
  • 23
  • 4
  • Unfortunately, msal is not a module, so it can't be imported [as noted in this SO question](https://stackoverflow.com/a/44235823/2120317). Hopefully it gets updated with module support in the future – Clay H Aug 10 '17 at 15:47

1 Answers1

0

msal 0.1.3 can be imported - see https://github.com/sunilbandla/vue-msal-sample

Lukas Cenovsky
  • 5,476
  • 2
  • 31
  • 39