sdusd-dx-component-library
v0.1.9
Published
SDUSD MS Entra login/logout component library
Downloads
1,452
Readme
SDUSD Dashboard Component Library
Includes components for SDUSD Entra login and logout with React hooks
SdusdEntraProvider
A React provider component that must wrap your application to provide the necessary context for the MS Entra state.
declare const SdusdEntraProvider: ({ application_id, directory_id, children, }: {
application_id: string;
directory_id: string;
redirectURI: string;
children: any;
}) => React.JSX.Element;
application_id
and directory_id
are required props that are provided by the SDUSD Entra team.
redirectURI
is the URI that the user will be redirected to after logging in or out.
SdusdEntraLogin
interface SdusdEntraLogoutProps {
logoutType: "popup" | "redirect";
logoutRedirectUri?: string;
}
logoutType
is required and must be either "popup" or "redirect", indicating the type of login window.
logoutRedirectUri
is optional and is the URI that the user will be redirected to after logging out.
interface SdusdEntraLoginProps {
showFamilyMemberSignin?: boolean;
loginType: "popup" | "redirect";
onSuccess?: (auth: any) => void;
onFailure?: (err: any) => void;
}
showFamilyMemberSignin
is optional and defaults to false
. If true
, the login window will show the option to sign in as a family member.
loginType
is required and must be either "popup" or "redirect", indicating the type of login window.
onSuccess
is optional and is a callback function that is called when the user successfully logs in.
onFailure
is optional and is a callback function that is called when the user fails to log in.