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>
24 lines
828 B
Dart
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;
|
|
}
|