Temporarily disable Passkey functionality in login and registration components
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 48s

Remove Passkey login and registration features from login.vue and registrieren.vue, including associated debug logs and UI elements. This change aims to streamline the user experience by focusing on standard login methods while Passkey support is under review. Additionally, disable Passkey management in profil.vue to ensure consistency across the application.
This commit is contained in:
Torsten Schulz (local)
2026-01-09 08:40:28 +01:00
parent 49a8d78b4f
commit d12380ee72
3 changed files with 48 additions and 94 deletions

View File

@@ -97,39 +97,14 @@
<span>{{ isLoading ? 'Anmeldung läuft...' : 'Anmelden' }}</span>
</button>
<!-- Passkey Button -->
<button
type="button"
:disabled="isLoading || isPasskeyLoading || !isPasskeySupported"
class="w-full px-6 py-3 border border-gray-300 hover:bg-gray-50 disabled:bg-gray-100 disabled:text-gray-400 text-gray-900 font-semibold rounded-lg transition-colors flex items-center justify-center"
@click="handlePasskeyLogin"
>
<Loader2
v-if="isPasskeyLoading"
:size="20"
class="mr-2 animate-spin"
/>
<span>
{{ isPasskeyLoading ? 'Passkey-Login läuft...' : (isPasskeySupported ? 'Mit Passkey anmelden' : 'Passkey nicht verfügbar') }}
</span>
</button>
<!-- Forgot Password Link -->
<div class="text-center space-y-2">
<div class="text-center">
<NuxtLink
to="/passwort-vergessen"
class="text-sm text-primary-600 hover:text-primary-700 font-medium"
>
Passwort vergessen?
</NuxtLink>
<div>
<NuxtLink
to="/passkey-wiederherstellen"
class="text-sm text-primary-600 hover:text-primary-700 font-medium"
>
Passkey verloren? Wiederherstellen
</NuxtLink>
</div>
</div>
</form>
</div>
@@ -162,15 +137,9 @@ const formData = ref({
})
const isLoading = ref(false)
const isPasskeyLoading = ref(false)
const errorMessage = ref('')
const successMessage = ref('')
const isPasskeySupported = ref(false)
if (process.client) {
isPasskeySupported.value = !!window.PublicKeyCredential
}
const handleLogin = async () => {
isLoading.value = true
errorMessage.value = ''
@@ -199,30 +168,8 @@ const handleLogin = async () => {
}
}
const handlePasskeyLogin = async () => {
isPasskeyLoading.value = true
errorMessage.value = ''
successMessage.value = ''
try {
const response = await authStore.passkeyLogin()
if (response.success) {
successMessage.value = 'Anmeldung per Passkey erfolgreich! Sie werden weitergeleitet...'
setTimeout(() => {
const roles = response.user.roles || (response.user.role ? [response.user.role] : [])
if (roles.includes('admin') || roles.includes('vorstand') || roles.includes('newsletter')) {
router.push('/cms')
} else {
router.push('/mitgliederbereich')
}
}, 800)
}
} catch (error) {
errorMessage.value = error?.data?.message || error?.message || 'Passkey-Login fehlgeschlagen.'
} finally {
isPasskeyLoading.value = false
}
}
// Passkey-Login vorläufig deaktiviert
// const handlePasskeyLogin = async () => { ... }
definePageMeta({
layout: 'default'

View File

@@ -424,7 +424,8 @@ const handleSave = async () => {
onMounted(() => {
loadProfile()
loadPasskeys()
// Passkey-Verwaltung vorläufig deaktiviert
// loadPasskeys()
})
definePageMeta({

View File

@@ -11,19 +11,12 @@
</div>
<div class="bg-white rounded-xl shadow-lg p-8">
<!-- Debug: Sichtbarer Test -->
<div class="mb-4 p-3 bg-yellow-200 border-2 border-yellow-500 rounded-lg text-sm font-mono">
<div class="font-bold text-yellow-900">🔍 DEBUG MODE AKTIV</div>
<div class="mt-1 text-yellow-800">Komponente: registrieren.vue geladen</div>
<div class="mt-1 text-yellow-800">Passkey-Support: {{ isPasskeySupported ? 'JA' : 'NEIN' }}</div>
<div class="mt-1 text-yellow-800">Use Passkey: {{ usePasskey ? 'JA' : 'NEIN' }}</div>
</div>
<form
class="space-y-6"
@submit.prevent="handleFormSubmit"
>
<!-- Registration Mode -->
<!-- Registration Mode - Passkey vorläufig deaktiviert -->
<!--
<div class="flex items-center justify-between bg-gray-50 border border-gray-200 rounded-lg p-3">
<div class="text-sm text-gray-700">
<div class="font-medium">Registrierungsmethode</div>
@@ -37,6 +30,7 @@
Mit Passkey
</label>
</div>
-->
<!-- Name -->
<div>
@@ -95,18 +89,18 @@
</div>
<!-- Password -->
<div v-if="!usePasskey || setPasswordForPasskey">
<div>
<label
for="password"
class="block text-sm font-medium text-gray-700 mb-2"
>
Passwort <span v-if="usePasskey" class="text-xs text-gray-500">(Fallback, optional)</span>
Passwort
</label>
<input
id="password"
v-model="formData.password"
type="password"
:required="!usePasskey"
required
autocomplete="new-password"
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-600 focus:border-transparent transition-all"
placeholder="••••••••"
@@ -117,25 +111,26 @@
</div>
<!-- Confirm Password -->
<div v-if="!usePasskey || setPasswordForPasskey">
<div>
<label
for="confirmPassword"
class="block text-sm font-medium text-gray-700 mb-2"
>
Passwort bestätigen <span v-if="usePasskey" class="text-xs text-gray-500">(Fallback)</span>
Passwort bestätigen
</label>
<input
id="confirmPassword"
v-model="formData.confirmPassword"
type="password"
:required="!usePasskey"
required
autocomplete="new-password"
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-600 focus:border-transparent transition-all"
placeholder="••••••••"
>
</div>
<!-- Optional password toggle for passkey users -->
<!-- Optional password toggle for passkey users - vorläufig deaktiviert -->
<!--
<div v-if="usePasskey" class="flex items-center gap-2 text-sm text-gray-700">
<input
v-model="setPasswordForPasskey"
@@ -174,9 +169,9 @@
</p>
</div>
<!-- Debug Info (nur bei Passkey-Registrierung) -->
<!-- Debug Info (nur bei Passkey-Registrierung) - vorläufig deaktiviert -->
<div
v-if="usePasskey && showDebugInfo && debugChallenge"
v-if="false"
class="bg-blue-50 border border-blue-200 rounded-lg p-4 text-xs space-y-3"
>
<div class="font-semibold text-blue-900 mb-2">🔍 Debug-Informationen (QR-Code):</div>
@@ -283,7 +278,7 @@
:size="20"
class="mr-2 animate-spin"
/>
<span>{{ isLoading ? 'Wird gesendet...' : (usePasskey ? 'Mit Passkey registrieren' : 'Registrierung beantragen') }}</span>
<span>{{ isLoading ? 'Wird gesendet...' : 'Registrierung beantragen' }}</span>
</button>
<!-- Back to Login -->
@@ -318,8 +313,9 @@ import { onMounted, ref } from 'vue'
import { AlertCircle, Check, Loader2, Info } from 'lucide-vue-next'
// Debug: Test-Ausgabe beim Laden der Komponente
console.log('[DEBUG] ===== registrieren.vue component loaded =====')
console.log('[DEBUG] Component setup started')
// Debug-Logs vorläufig deaktiviert
// console.log('[DEBUG] ===== registrieren.vue component loaded =====')
// console.log('[DEBUG] Component setup started')
const formData = ref({
name: '',
@@ -337,24 +333,30 @@ const isPasskeySupported = ref(false)
const passkeySupportReason = ref('')
const setPasswordForPasskey = ref(true)
console.log('[DEBUG] Component refs initialized')
// Debug-Logs vorläufig deaktiviert
// // Debug-Logs vorläufig deaktiviert
// console.log('[DEBUG] Component refs initialized')
// Debug: Log beim Form-Submit
const handleFormSubmit = (event) => {
console.log('[DEBUG] ===== FORM SUBMIT EVENT =====')
console.log('[DEBUG] Form submitted', {
usePasskey: usePasskey.value,
name: formData.value.name,
email: formData.value.email
})
// Debug-Logs vorläufig deaktiviert
// console.log('[DEBUG] ===== FORM SUBMIT EVENT =====')
// console.log('[DEBUG] Form submitted', {
// usePasskey: usePasskey.value,
// name: formData.value.name,
// email: formData.value.email
// })
if (usePasskey.value) {
console.log('[DEBUG] Calling handleRegisterWithPasskey...')
handleRegisterWithPasskey()
} else {
console.log('[DEBUG] Calling handleRegister...')
handleRegister()
}
// Passkey-Registrierung vorläufig deaktiviert
// if (usePasskey.value) {
// console.log('[DEBUG] Calling handleRegisterWithPasskey...')
// handleRegisterWithPasskey()
// } else {
// console.log('[DEBUG] Calling handleRegister...')
// handleRegister()
// }
// console.log('[DEBUG] Calling handleRegister...')
handleRegister()
}
const showDebugInfo = ref(false)
const debugChallenge = ref('')
@@ -429,9 +431,12 @@ const handleRegister = async () => {
}
}
// Passkey-Registrierung vorläufig deaktiviert - alle Debug-Logs entfernt
/*
// Passkey-Registrierung vorläufig deaktiviert - alle Debug-Logs entfernt
/*
const handleRegisterWithPasskey = async () => {
console.log('[DEBUG] ===== handleRegisterWithPasskey CALLED =====')
console.log('[DEBUG] Function entry point reached')
// Debug-Logs entfernt
errorMessage.value = ''
successMessage.value = ''
@@ -890,6 +895,7 @@ const handleRegisterWithPasskey = async () => {
}
}
}
*/
useHead({
title: 'Registrierung - Harheimer TC',