Shuffle/app/lib/features/auth/domain/auth_status.dart
cschlaefke 87c0d7d1ec feat(auth): add password reset (forgot password, recovery link, new password)
ForgotPasswordScreen with neutral reaction (F12), CheckEmail reset mode on
its own path, recovery link handling and ResetPasswordScreen with the
recovery guard held until the user confirms the success message. Carries
the from parameter between login, register and forgot password. Removes
the route placeholders.

Refs #1

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 09:47:03 +01:00

24 lines
828 B
Dart

import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:shuffle/features/auth/domain/auth_user.dart';
part 'auth_status.freezed.dart';
/// Anmeldestatus der App.
///
/// [AuthStatus.passwordRecovery] gilt nur im laufenden Prozess: Eine
/// Recovery-Sitzung ist nach einem Neustart nicht mehr von einer normalen
/// Anmeldung zu unterscheiden (Spec #1 § 5.4, Risiko R12).
@freezed
sealed class AuthStatus with _$AuthStatus {
const AuthStatus._();
const factory AuthStatus.signedOut() = SignedOut;
const factory AuthStatus.signedIn(AuthUser user) = SignedIn;
const factory AuthStatus.passwordRecovery(
AuthUser user, {
@Default(false) bool passwordChanged,
}) = PasswordRecovery;
bool get isSignedOut => this is SignedOut;
bool get isPasswordRecovery => this is PasswordRecovery;
}