How to use react-adal - 10 common examples

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 microsoft / AspNetCore-React-WebApp / client / src / index.ts View on Github external
import { runWithAdal } from 'react-adal';

import { authContext } from './adalConfig';

// set to false after configuring environment variables and adalConfig.ts
const DO_NOT_LOGIN = true;

runWithAdal(
    authContext,
    () => {
        require('app/App.tsx');
    },
    DO_NOT_LOGIN
);
github jjcollinge / terraform-deploy-to-azure / tfdeploy / src / index.js View on Github external
import { runWithAdal } from 'react-adal';
import { authContext } from './adalConfig.js';

const DO_NOT_LOGIN = true;

runWithAdal(authContext, () => {
  // eslint-disable-next-line
  require('./indexApp.js');
}, DO_NOT_LOGIN);
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 Azure / AIPlatform / end-to-end-solutions / Luna / src / Luna.UI / isv_client / src / adalConfig.ts View on Github external
constructor() {
    this.authContext = new AuthenticationContext(adalConfig);
  }
  get AuthContext() {
github microsoft / AspNetCore-React-WebApp / client / src / adalConfig.ts View on Github external
import { adalFetch, AuthenticationContext, withAdalLogin } from 'react-adal';

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);
github microsoft / AspNetCore-React-WebApp / client / src / adalConfig.ts View on Github external
export const adalApiFetch = (fetch: (input: string, init: any) => Promise, url: string, options: any) =>
    adalFetch(authContext, adalConfig.endpoints.api, fetch, url, options);
github jjcollinge / terraform-deploy-to-azure / tfdeploy / src / adalConfig.js View on Github external
export const adalApiFetch = (fetch, url, options) =>
  adalFetch(authContext, {}, fetch, url, options);
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);
github Azure / AIPlatform / end-to-end-solutions / Luna / src / Luna.UI / isv_client / src / adalConfig.ts View on Github external
public GetToken(): Promise {
    return adalGetToken(this.authContext, endpoint);
  }
  public LogOut() {

react-adal

Azure Active Directory (ADAL) support for ReactJS

MIT
Latest version published 4 years ago

Package Health Score

51 / 100
Full package analysis