I’ve implemented Azure active directory sso in my react application. I am trying to implement logout functionality using msalInstance.logoutRedirect function.
I want to achieve a solution where clicking a logout button clears session data and redirects an user to some kind of “Signed out successfully” microsoft screen.
Instead it redirects to account selection microsoft screen.
My auth config:
export const authConfig = {
auth: {
clientId: SSO_CLIENT_ID,
authority: SSO_AUTHORITY,
redirectUri: SSO_REDIRECT_URI,
},
cache: {
cacheLocation: "localStorage",
storeAuthStateInCookie: false,
},
system: {
allowNativeBroker: false,
},
};
I tried this solution. It clears session data but doesn’t redirect anywhere. Just stays at the same url as it was.
instance.logoutRedirect({
onRedirectNavigate:() => {
return false
}
})
marcinshz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.