How to use the react-adal.withAdalLogin function in react-adal

To help you get started, we’ve selected a few react-adal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jjcollinge / terraform-deploy-to-azure / tfdeploy / src / adalConfig.js View on Github external
import { AuthenticationContext, adalFetch, withAdalLogin } from 'react-adal';

export const adalConfig = {
  clientId: 'c35f7790-574d-4da6-b6d0-be16dca2c51e',
  cacheLocation: 'localStorage',
};

export const authContext = new AuthenticationContext(adalConfig);

export const adalApiFetch = (fetch, url, options) =>
  adalFetch(authContext, {}, fetch, url, options);

export const withAdalLoginApi = withAdalLogin(authContext, {});
github microsoft / AspNetCore-React-WebApp / client / src / adalConfig.ts View on Github external
export const adalConfig = {
    tenant: process.env.REACT_APP_TENANT_ID,
    clientId: process.env.REACT_APP_CLIENT_ID,
    endpoints: {
        api: ''
    },
    cacheLocation: 'localStorage' as 'localStorage'
};

export const authContext = new AuthenticationContext(adalConfig);

export const adalApiFetch = (fetch: (input: string, init: any) => Promise, url: string, options: any) =>
    adalFetch(authContext, adalConfig.endpoints.api, fetch, url, options);

export const withAdalLoginApi = withAdalLogin(authContext, adalConfig.endpoints.api);

react-adal

Azure Active Directory (ADAL) support for ReactJS

MIT
Latest version published 4 years ago

Package Health Score

51 / 100
Full package analysis