fix: make refreshToken optional in LoginResponse for 2FA flow

The 2FA challenge response does not include a refreshToken (token is only
issued after successful 2FA verification). Making the field optional fixes
the TS2741 compilation error that prevented the core service from starting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Reitz 2026-03-08 21:13:31 +01:00
parent 1643db0e7b
commit ffb618ee65
2 changed files with 2 additions and 2 deletions

View file

@ -45,7 +45,7 @@ export class AuthController {
// Refresh-Token als HttpOnly Cookie setzen (NICHT im localStorage!) // Refresh-Token als HttpOnly Cookie setzen (NICHT im localStorage!)
// Regel: Kein localStorage fuer Tokens // Regel: Kein localStorage fuer Tokens
this.setRefreshTokenCookie(res, result.refreshToken); this.setRefreshTokenCookie(res, result.refreshToken!);
return { return {
accessToken: result.accessToken, accessToken: result.accessToken,

View file

@ -21,7 +21,7 @@ interface TokenPair {
interface LoginResponse { interface LoginResponse {
accessToken: string; accessToken: string;
refreshToken: string; refreshToken?: string;
user: { user: {
id: string; id: string;
email: string; email: string;