Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function logoutButtonHandler (_event) {
// UI.preferences.set('me', '')
solidAuthClient.logout().then(
function () {
const message = `Your WebID was ${me}. It has been forgotten.`
me = null
try {
log.alert(message)
} catch (e) {
window.alert(message)
}
box.refresh()
if (listener) listener(null)
},
err => {
alert('Fail to log out:' + err)
}
)
}
onClick={() => auth.logout()}>{children};
}
logout: async function(){
session=''
var res = await solid.logout();
return res;
},
userInfo.addEventListener('click', async function(e) {
if (e.target.closest('.signout-user')) {
if (Config.User.OIDC) {
await solidAuth.logout();
}
storage.removeLocalStorageProfile()
Config.User = {
IRI: null,
Role: 'social',
UI: {}
}
util.removeChildren(node);
var documentMenu = document.querySelector('#document-menu')
showUserSigninSignout(documentMenu.querySelector('header'))