I am using the React Login Microsoft-Graph-Toolkit component (see snippet Below) and MSAL2Provider to log users into my Active Directory application, which works well. However, I have a requirement to logout a user from a custom logout button. The button should be able to logout the current user session. Can anyone advise how do to initiate a login/logout using MSAL2Provider?
Code Snippet:
Providers.globalProvider = new Msal2Provider({
clientId: "client-id"
});
<Login
loginCompleted={(event) => {mgtSSOLoggedIn(event)}}
loginFailed={(event) => {mgtSSOFailed(event)}}
/>