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>
|
||||
</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'
|
||||
|
||||
Reference in New Issue
Block a user