Temporarily disable Passkey functionality in login and registration components
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 48s
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:
@@ -97,39 +97,14 @@
|
|||||||
<span>{{ isLoading ? 'Anmeldung läuft...' : 'Anmelden' }}</span>
|
<span>{{ isLoading ? 'Anmeldung läuft...' : 'Anmelden' }}</span>
|
||||||
</button>
|
</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 -->
|
<!-- Forgot Password Link -->
|
||||||
<div class="text-center space-y-2">
|
<div class="text-center">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
to="/passwort-vergessen"
|
to="/passwort-vergessen"
|
||||||
class="text-sm text-primary-600 hover:text-primary-700 font-medium"
|
class="text-sm text-primary-600 hover:text-primary-700 font-medium"
|
||||||
>
|
>
|
||||||
Passwort vergessen?
|
Passwort vergessen?
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<div>
|
|
||||||
<NuxtLink
|
|
||||||
to="/passkey-wiederherstellen"
|
|
||||||
class="text-sm text-primary-600 hover:text-primary-700 font-medium"
|
|
||||||
>
|
|
||||||
Passkey verloren? Wiederherstellen
|
|
||||||
</NuxtLink>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -162,15 +137,9 @@ const formData = ref({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const isLoading = ref(false)
|
const isLoading = ref(false)
|
||||||
const isPasskeyLoading = ref(false)
|
|
||||||
const errorMessage = ref('')
|
const errorMessage = ref('')
|
||||||
const successMessage = ref('')
|
const successMessage = ref('')
|
||||||
|
|
||||||
const isPasskeySupported = ref(false)
|
|
||||||
if (process.client) {
|
|
||||||
isPasskeySupported.value = !!window.PublicKeyCredential
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleLogin = async () => {
|
const handleLogin = async () => {
|
||||||
isLoading.value = true
|
isLoading.value = true
|
||||||
errorMessage.value = ''
|
errorMessage.value = ''
|
||||||
@@ -199,30 +168,8 @@ const handleLogin = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlePasskeyLogin = async () => {
|
// Passkey-Login vorläufig deaktiviert
|
||||||
isPasskeyLoading.value = true
|
// const handlePasskeyLogin = async () => { ... }
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default'
|
layout: 'default'
|
||||||
|
|||||||
@@ -424,7 +424,8 @@ const handleSave = async () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadProfile()
|
loadProfile()
|
||||||
loadPasskeys()
|
// Passkey-Verwaltung vorläufig deaktiviert
|
||||||
|
// loadPasskeys()
|
||||||
})
|
})
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
|
|||||||
@@ -11,19 +11,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bg-white rounded-xl shadow-lg p-8">
|
<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
|
<form
|
||||||
class="space-y-6"
|
class="space-y-6"
|
||||||
@submit.prevent="handleFormSubmit"
|
@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="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="text-sm text-gray-700">
|
||||||
<div class="font-medium">Registrierungsmethode</div>
|
<div class="font-medium">Registrierungsmethode</div>
|
||||||
@@ -37,6 +30,7 @@
|
|||||||
Mit Passkey
|
Mit Passkey
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- Name -->
|
<!-- Name -->
|
||||||
<div>
|
<div>
|
||||||
@@ -95,18 +89,18 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Password -->
|
<!-- Password -->
|
||||||
<div v-if="!usePasskey || setPasswordForPasskey">
|
<div>
|
||||||
<label
|
<label
|
||||||
for="password"
|
for="password"
|
||||||
class="block text-sm font-medium text-gray-700 mb-2"
|
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>
|
</label>
|
||||||
<input
|
<input
|
||||||
id="password"
|
id="password"
|
||||||
v-model="formData.password"
|
v-model="formData.password"
|
||||||
type="password"
|
type="password"
|
||||||
:required="!usePasskey"
|
required
|
||||||
autocomplete="new-password"
|
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"
|
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="••••••••"
|
placeholder="••••••••"
|
||||||
@@ -117,25 +111,26 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Confirm Password -->
|
<!-- Confirm Password -->
|
||||||
<div v-if="!usePasskey || setPasswordForPasskey">
|
<div>
|
||||||
<label
|
<label
|
||||||
for="confirmPassword"
|
for="confirmPassword"
|
||||||
class="block text-sm font-medium text-gray-700 mb-2"
|
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>
|
</label>
|
||||||
<input
|
<input
|
||||||
id="confirmPassword"
|
id="confirmPassword"
|
||||||
v-model="formData.confirmPassword"
|
v-model="formData.confirmPassword"
|
||||||
type="password"
|
type="password"
|
||||||
:required="!usePasskey"
|
required
|
||||||
autocomplete="new-password"
|
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"
|
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="••••••••"
|
placeholder="••••••••"
|
||||||
>
|
>
|
||||||
</div>
|
</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">
|
<div v-if="usePasskey" class="flex items-center gap-2 text-sm text-gray-700">
|
||||||
<input
|
<input
|
||||||
v-model="setPasswordForPasskey"
|
v-model="setPasswordForPasskey"
|
||||||
@@ -174,9 +169,9 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Debug Info (nur bei Passkey-Registrierung) -->
|
<!-- Debug Info (nur bei Passkey-Registrierung) - vorläufig deaktiviert -->
|
||||||
<div
|
<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"
|
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>
|
<div class="font-semibold text-blue-900 mb-2">🔍 Debug-Informationen (QR-Code):</div>
|
||||||
@@ -283,7 +278,7 @@
|
|||||||
:size="20"
|
:size="20"
|
||||||
class="mr-2 animate-spin"
|
class="mr-2 animate-spin"
|
||||||
/>
|
/>
|
||||||
<span>{{ isLoading ? 'Wird gesendet...' : (usePasskey ? 'Mit Passkey registrieren' : 'Registrierung beantragen') }}</span>
|
<span>{{ isLoading ? 'Wird gesendet...' : 'Registrierung beantragen' }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Back to Login -->
|
<!-- Back to Login -->
|
||||||
@@ -318,8 +313,9 @@ import { onMounted, ref } from 'vue'
|
|||||||
import { AlertCircle, Check, Loader2, Info } from 'lucide-vue-next'
|
import { AlertCircle, Check, Loader2, Info } from 'lucide-vue-next'
|
||||||
|
|
||||||
// Debug: Test-Ausgabe beim Laden der Komponente
|
// Debug: Test-Ausgabe beim Laden der Komponente
|
||||||
console.log('[DEBUG] ===== registrieren.vue component loaded =====')
|
// Debug-Logs vorläufig deaktiviert
|
||||||
console.log('[DEBUG] Component setup started')
|
// console.log('[DEBUG] ===== registrieren.vue component loaded =====')
|
||||||
|
// console.log('[DEBUG] Component setup started')
|
||||||
|
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
name: '',
|
name: '',
|
||||||
@@ -337,24 +333,30 @@ const isPasskeySupported = ref(false)
|
|||||||
const passkeySupportReason = ref('')
|
const passkeySupportReason = ref('')
|
||||||
const setPasswordForPasskey = ref(true)
|
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
|
// Debug: Log beim Form-Submit
|
||||||
const handleFormSubmit = (event) => {
|
const handleFormSubmit = (event) => {
|
||||||
console.log('[DEBUG] ===== FORM SUBMIT EVENT =====')
|
// Debug-Logs vorläufig deaktiviert
|
||||||
console.log('[DEBUG] Form submitted', {
|
// console.log('[DEBUG] ===== FORM SUBMIT EVENT =====')
|
||||||
usePasskey: usePasskey.value,
|
// console.log('[DEBUG] Form submitted', {
|
||||||
name: formData.value.name,
|
// usePasskey: usePasskey.value,
|
||||||
email: formData.value.email
|
// name: formData.value.name,
|
||||||
})
|
// email: formData.value.email
|
||||||
|
// })
|
||||||
|
|
||||||
if (usePasskey.value) {
|
// Passkey-Registrierung vorläufig deaktiviert
|
||||||
console.log('[DEBUG] Calling handleRegisterWithPasskey...')
|
// if (usePasskey.value) {
|
||||||
handleRegisterWithPasskey()
|
// console.log('[DEBUG] Calling handleRegisterWithPasskey...')
|
||||||
} else {
|
// handleRegisterWithPasskey()
|
||||||
console.log('[DEBUG] Calling handleRegister...')
|
// } else {
|
||||||
|
// console.log('[DEBUG] Calling handleRegister...')
|
||||||
|
// handleRegister()
|
||||||
|
// }
|
||||||
|
// console.log('[DEBUG] Calling handleRegister...')
|
||||||
handleRegister()
|
handleRegister()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
const showDebugInfo = ref(false)
|
const showDebugInfo = ref(false)
|
||||||
const debugChallenge = ref('')
|
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 () => {
|
const handleRegisterWithPasskey = async () => {
|
||||||
console.log('[DEBUG] ===== handleRegisterWithPasskey CALLED =====')
|
// Debug-Logs entfernt
|
||||||
console.log('[DEBUG] Function entry point reached')
|
|
||||||
|
|
||||||
errorMessage.value = ''
|
errorMessage.value = ''
|
||||||
successMessage.value = ''
|
successMessage.value = ''
|
||||||
@@ -890,6 +895,7 @@ const handleRegisterWithPasskey = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: 'Registrierung - Harheimer TC',
|
title: 'Registrierung - Harheimer TC',
|
||||||
|
|||||||
Reference in New Issue
Block a user