Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ra-auth-msal

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ra-auth-msal - npm Package Versions

3.0.2

Diff

Changelog

Source

3.0.2

  • Fix DeepLinkRedirect feature (#18) (erwanMarmelab)
slax57
published 3.0.1 •

Changelog

Source

3.0.1

  • Fix uninitialized_public_client_application and interaction_in_progress errors (#16) (benin-work)
  • [Demo] Improve demo setup (#17) (djhi)
fzaninotto
published 3.0.0 •

Changelog

Source

3.0.0

  • Upgrade @azure/msal-browser to v3

Breaking Changes

In MSAL v3.x, you must initialize the application object by calling the initialize function asynchronously.

One way to achieve this is by using the useEffect hook in your main component:

// in src/App.jsx
-import React from 'react';
+import React, { useEffect } from "react";
import { Admin, Resource } from 'react-admin';
import { BrowserRouter } from "react-router-dom";
import { PublicClientApplication } from "@azure/msal-browser";
import { LoginPage, msalAuthProvider } from "ra-auth-msal";
import dataProvider from './dataProvider';
import posts from './posts';
import { msalConfig } from "./authConfig";

const myMSALObj = new PublicClientApplication(msalConfig);

const App = () => {
+ const [isMSALInitialized, setMSALInitialized] = React.useState(false);
+ useEffect(() => {
+   myMSALObj.initialize().then(() => {
+     setMSALInitialized(true);
+   });
+ }, []);

  const authProvider = msalAuthProvider({
    msalInstance: myMSALObj,
  });

+ if (!isMSALInitialized) {
+   return <div>Loading...</div>;
+ }

  return (
    <BrowserRouter>
       <Admin
           authProvider={authProvider}
           dataProvider={dataProvider}
           title="Example Admin"
           loginPage={LoginPage}
        >
            <Resource name="posts" {...posts} />
      </Admin>
    </BrowserRouter>
   );
};
export default App;

See the MSAL upgrade guide for more information.

slax57
published 2.0.0 •

Changelog

Source

2.0.0

  • Upgrade react-admin to v5
  • Remove prop-types
djhi
published 1.2.0 •

Changelog

Source

1.2.0

djhi
published 1.1.0 •

Changelog

Source

1.1.0

  • Add support for automatic token refresh (#7) (djhi)
  • Suppress error message when redirecting to login after unsuccessful auth (#6) (MarkSFrancis)
  • [Doc] Improve msalHttpClient documentation (#3) (slax57)
fzaninotto
published 1.0.0 •

Changelog

Source

1.0.0

  • Initial release
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc