2
0
mirror of https://github.com/lowdefy/lowdefy.git synced 2025-03-31 15:20:32 +08:00

fix(renderer): Id token was not sent with openIdLogoutUrlInput request.

This commit is contained in:
SamTolmay 2021-05-03 12:49:32 +02:00
parent 427b3a1003
commit e636c79767

@ -26,17 +26,17 @@ function createLogout(lowdefy) {
async function logout() {
try {
lowdefy.user = {};
const idToken = lowdefy.localStorage.getItem('idToken');
lowdefy.localStorage.setItem(`idToken`, '');
const { data } = await lowdefy.client.query({
query: GET_LOGOUT,
fetchPolicy: 'network-only',
variables: {
openIdLogoutUrlInput: {
idToken: '',
idToken,
},
},
});
// TODO: should we call link??
lowdefy.window.location.href = data.openIdLogoutUrl || lowdefy.window.location.origin;
} catch (error) {
throw new Error(error);