Nxing/Caddy forward_auth support. Various fixes to bugs created in earlier edits. Vite server needs different base in dev mode, fixed.

This commit is contained in:
2025-07-14 04:54:53 +00:00
parent e7192e078e
commit 286a5180a4
6 changed files with 42 additions and 26 deletions
+5 -1
View File
@@ -31,7 +31,11 @@ const handleLogin = async () => {
authStore.showMessage('Starting authentication...', 'info')
await authStore.authenticate()
authStore.showMessage('Authentication successful!', 'success', 2000)
authStore.currentView = 'profile'
if (location.pathname.startsWith('/auth/')) {
authStore.currentView = 'profile'
} else {
location.reload()
}
} catch (error) {
authStore.showMessage(`Authentication failed: ${error.message}`, 'error')
}
+2 -2
View File
@@ -5,7 +5,7 @@
<form @submit.prevent="handleRegister">
<input
type="text"
v-model="username"
v-model="user_name"
placeholder="Enter username"
required
:disabled="authStore.isLoading"
@@ -13,7 +13,7 @@
<button
type="submit"
class="btn-primary"
:disabled="authStore.isLoading || !username.trim()"
:disabled="authStore.isLoading || !user_name.trim()"
>
{{ authStore.isLoading ? 'Registering...' : 'Register Passkey' }}
</button>