mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-26 01:46:29 +00:00
# Which Problems Are Solved This PR enhances the passkey authentication flow with comprehensive error handling, full internationalization support, and extensive test coverage. # How the Problems Are Solved I18n: - Replaced all hard-coded error messages with i18n translation keys - Consistent error messaging throughout the passkey flow - Added specific error handling for passkey cancellation (NotAllowedError) - Implemented fallback errors for undefined/missing responses - Better error messages for: - Session retrieval failures - Challenge request failures - User verification errors - Redirect determination issues Tests: - Added `login-passkey.test.tsx` with 100+ test cases covering: - Successful verification flows - Error scenarios and edge cases - Props handling - Component lifecycle - Added passkeys.test.ts with server-side function tests: - Session cookie retrieval - User validation - Custom lifetime handling - Critical fallback error paths Try-catch blocks around critical user retrieval operations Defensive checks for undefined responses from completeFlowOrGetUrl Support for custom lifetime parameters Cleaner error propagation