Thanks. I have looked into them. I know that i cloud just delete the sessionStorage als this example shows:
(https://github.com/casdoor/casdoor-raw-js-example/blob/master/index.html#L49)
function signOut() {
sessionStorage.removeItem("token");
window.location.href = "http://localhost:5000";
}
but that does not affect the login state within casdoor.
I was trying something like:
router.get('/login', (req, res) => {
const redirectUri = `${process.env.ENV_URL}/callback`;
// using Standard-OAuth2 Flow
const casdoorUrl = `${casdoorConfig.endpoint}/login/oauth/authorize?` +
`client_id=${casdoorConfig.clientId}` +
`&response_type=code token id_token` +
`&redirect_uri=${encodeURIComponent(redirectUri)}` +
`&scope=openid%20profile%20email`;
res.redirect(casdoorUrl);
});
router.get('/logout', async (req, res) => {
const idToken = ***;
const redirectUri = process.env.ENV_URL;
try {
await axios.post(`${casdoorConfig.endpoint}/api/logout`, null, {
params: {
id_token_hint: idToken,
post_logout_redirect_uri: redirectUri,
state: 'my_state_value'
}
});
} catch (error) {
console.error('Logout-Error:', error);
}
req.session.destroy(() => {
res.redirect(redirectUri);
});
});
with &response_type=code token id_token i have tried a lot. Some times casdoor responds with not loading the login page. Sometimes i recieve the id_token as fragment. But i want the id_token param. wich doesnt work. 😢
I want to logout the user within all applications of the organisation. Or is this intended to be done different? Thanks!

