diff --git a/client/auth/logout.js b/client/auth/logout.js index 2ac1a5a..76493f9 100644 --- a/client/auth/logout.js +++ b/client/auth/logout.js @@ -52,7 +52,7 @@ module.exports = async function logout(params) { //////////////////////////////////////// const cookies = parseClientCookies(); - const socialId = cookies.datasquirel_social_id; + const socialId = cookies?.datasquirel_social_id && typeof cookies.datasquirel_social_id == "string" && !cookies.datasquirel_social_id.match(/^null$/i) ? cookies.datasquirel_social_id : null; //////////////////////////////////////// //////////////////////////////////////// @@ -75,7 +75,7 @@ module.exports = async function logout(params) { ////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// - if (socialId) { + if (socialId && !socialId?.match(/^null$/i)) { const googleClientId = params?.googleClientId; if (googleClientId) { @@ -110,6 +110,8 @@ module.exports = async function logout(params) { //////////////////////////////////////// } }; + } else { + resolve(true); } //////////////////////////////////////// diff --git a/package.json b/package.json index 8825368..bc76adb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasquirel", - "version": "1.1.51", + "version": "1.1.52", "description": "Cloud-based SQL data management tool", "main": "index.js", "scripts": {