UNPKG

react-adal-adfs

Version:

Azure Active Directory (ADAL) support for ReactJS Form Post

18 lines (13 loc) 619 B
import { AuthenticationContext, adalFetch, withAdalLogin } from '../src/react-adal'; export const adalConfig = { tenant: '14d71d65-f596-4eae-be30-27f079bf8d4b', clientId: '14d71d65-f596-4eae-be30-27f079bf8d4b', endpoints: { api: '14d71d65-f596-4eae-be30-27f079bf8d4b', }, cacheLocation: 'localStorage', }; export const authContext = new AuthenticationContext(adalConfig); export const adalApiFetch = (fetch, url, options) => adalFetch(authContext, adalConfig.endpoints.api, fetch, url, options); export const withAdalLoginApi = withAdalLogin(authContext, adalConfig.endpoints.api);