Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
);
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);
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, {});
constructor() {
this.authContext = new AuthenticationContext(adalConfig);
}
get AuthContext() {
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);
export const adalApiFetch = (fetch: (input: string, init: any) => Promise, url: string, options: any) =>
adalFetch(authContext, adalConfig.endpoints.api, fetch, url, options);
export const adalApiFetch = (fetch, url, options) =>
adalFetch(authContext, {}, fetch, url, options);
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, {});
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);
public GetToken(): Promise {
return adalGetToken(this.authContext, endpoint);
}
public LogOut() {