feat(auth): add password strength indicator and magic links

Password strength (zxcvbn-ts):
- PasswordStrength component with 4-segment color bar and German feedback
- Lazy-loaded with 150ms debounce to avoid SSR/bundle issues
- Integrated into RegisterPage and ChangePassword components

Magic Links (passwordless email):
- Better Auth magicLink plugin (10-minute expiry)
- sendMagicLinkEmail() in email service (German template)
- Passthrough route for /magic-link/* endpoints
- sendMagicLink() in shared-auth client
- "Login-Link per E-Mail senden" button on all 20 login pages
- All 21 auth stores have sendMagicLink() method

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-27 11:23:09 +01:00
parent 86d1da3587
commit cc50c0c2ab
49 changed files with 430 additions and 1 deletions

View file

@ -142,6 +142,12 @@ export const auth = {
return result;
},
async sendMagicLink(email: string) {
const authService = getAuthService();
if (!authService) return { success: false, error: 'Auth not available on server' };
return authService.sendMagicLink(email);
},
isPasskeyAvailable(): boolean {
const authService = getAuthService();
if (!authService) return false;

View file

@ -44,6 +44,7 @@
onSignInWithPasskey={() => auth.signInWithPasskey()}
onVerifyTwoFactor={(code, trust) => auth.verifyTwoFactor(code, trust)}
onVerifyBackupCode={(code) => auth.verifyBackupCode(code)}
onSendMagicLink={(email) => auth.sendMagicLink(email)}
{goto}
successRedirect={redirectTo}
registerPath="/register"