Cleaned up login/logout flows.

This commit is contained in:
2025-09-03 07:08:16 +00:00
parent 4052122d40
commit 09b9894407
8 changed files with 46 additions and 18 deletions
+3 -3
View File
@@ -27,9 +27,9 @@ const handleLogin = async () => {
await authStore.authenticate()
authStore.showMessage('Authentication successful!', 'success', 2000)
if (authStore.restrictedMode) {
// In restricted mode after successful auth show permission denied (no profile outside /auth/)
authStore.currentView = 'permission-denied'
} else if (location.pathname.startsWith('/auth/')) {
// Restricted mode: reload so the app re-mounts and selectView() applies (will become permission denied)
location.reload()
} else if (location.pathname === '/auth/') {
authStore.currentView = 'profile'
} else {
location.reload()
@@ -32,7 +32,6 @@ function back() {
}
async function logout() {
await authStore.logout()
authStore.currentView = 'login'
}
</script>
<style scoped>
-1
View File
@@ -144,7 +144,6 @@ const deleteCredential = async (credentialId) => {
const logout = async () => {
await authStore.logout()
authStore.currentView = 'login'
}
const isAdmin = computed(() => !!(authStore.userInfo?.is_global_admin || authStore.userInfo?.is_org_admin))