semblance-dev/node_modules/@azure/msal-react/dist/components/MsalAuthenticationTemplate.d.ts
2025-12-19 19:26:16 +00:00

16 lines
1 KiB
TypeScript
Executable file

import React, { PropsWithChildren } from "react";
import { AccountIdentifiers } from "../types/AccountIdentifiers.js";
import { MsalAuthenticationResult } from "../hooks/useMsalAuthentication.js";
import { InteractionType, PopupRequest, RedirectRequest, SsoSilentRequest } from "@azure/msal-browser";
import { IMsalContext } from "../MsalContext.js";
export 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;