technology logo
technology logo

My First List

share link

by rahulkalasuva99 dot icon Updated: Dec 30, 2022

Guide Kit Guide Kit  

import React, { PropsWithChildren } from "react";

import { AccountIdentifiers } from "../types/AccountIdentifiers";

import { MsalAuthenticationResult } from "../hooks/useMsalAuthentication";

import { InteractionType, PopupRequest, RedirectRequest, SsoSilentRequest } from "@azure/msal-browser";

import { IMsalContext } from "../MsalContext";

export declare type MsalAuthenticationProps = PropsWithChildren<AccountIdentifiers & {

    interactionType: InteractionType;

    authenticationRequest?: PopupRequest | RedirectRequest | SsoSilentRequest;

    loadingComponent?: React.ElementType<IMsalContext>;

    errorComponent?: React.ElementType<MsalAuthenticationResult>;

}>;

/**

 * Attempts to authenticate user if not already authenticated, then renders child components

 * @param props

 */

export declare function MsalAuthenticationTemplate({ interactionType, username, homeAccountId, localAccountId, authenticationRequest, loadingComponent: LoadingComponent, errorComponent: ErrorComponent, children }: MsalAuthenticationProps): React.ReactElement | null;