Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@dlarsson-se/react-msal

dlarssonse9MITdeprecated0.1.0TypeScript support: included

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

Functions for authentication with MS

msal, ms, azure, auth, openid, typescript

readme

react-msal

NPM JavaScript Style Guide

Install

npm install --save react-msal

Usage

import * as React from 'react'

import { useReactMSAL } from 'react-msal'

class Example extends React.Component {
  const reactMSAL = useReactMSAL({ config })

  useEffect(() => {
    console.log(reactMSAL.accessToken);
  }, [reactMSAL.accessToken]);

  render () {
    return (
      <Button onClick={reactMSAL.login} />
    )
  }
}

License

MIT © dlarssonse