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:
@@ -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')
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -15,7 +15,7 @@ export async function register(url, options) {
|
||||
}
|
||||
|
||||
export async function registerUser(user_name) {
|
||||
return register('/auth/ws/new_user_registration', { user_name })
|
||||
return register('/auth/ws/register_new', { user_name })
|
||||
}
|
||||
|
||||
export async function registerCredential() {
|
||||
|
||||
Reference in New Issue
Block a user