Merge pull request #10140 from Budibase/fix/gsheet-logout
GSheet logout possible fix
This commit is contained in:
commit
08f07d5e3a
|
@ -41,13 +41,13 @@
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.tenantId !== urlTenantId) {
|
if (urlTenantId && user.tenantId !== urlTenantId) {
|
||||||
// user should not be here - play it safe and log them out
|
// user should not be here - play it safe and log them out
|
||||||
try {
|
try {
|
||||||
await auth.logout()
|
await auth.logout()
|
||||||
await auth.setOrganisation(null)
|
await auth.setOrganisation(null)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Swallow error and do nothing
|
console.error("Tenant mis-match, logout.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue