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>
39 lines
1.5 KiB
Dart
39 lines
1.5 KiB
Dart
import 'package:shuffle/core/result/result.dart';
|
|
import 'package:shuffle/features/auth/domain/auth_failure.dart';
|
|
import 'package:shuffle/features/auth/domain/auth_status.dart';
|
|
import 'package:shuffle/features/auth/domain/email_link_type.dart';
|
|
import 'package:shuffle/features/auth/domain/registration_input.dart';
|
|
|
|
/// Zugriff auf die Anmeldung (Implementierung: Supabase/GoTrue).
|
|
abstract interface class AuthRepository {
|
|
/// Aktueller Status gefolgt von allen Änderungen.
|
|
Stream<AuthStatus> watchStatus();
|
|
|
|
/// Aktueller Status, synchron (für Router-Redirects).
|
|
AuthStatus get currentStatus;
|
|
|
|
/// Registriert ein Konto. Jede 200-Antwort ist Erfolg; ob die Adresse schon
|
|
/// existiert, wird nicht ausgewertet (KTO-01 Kriterium 4).
|
|
Future<Result<void, AuthFailure>> signUp(RegistrationInput input);
|
|
|
|
Future<Result<void, AuthFailure>> resendConfirmation(String email);
|
|
|
|
Future<Result<void, AuthFailure>> signIn(String email, String password);
|
|
|
|
Future<Result<void, AuthFailure>> requestPasswordReset(String email);
|
|
|
|
Future<Result<void, AuthFailure>> verifyEmailLink(
|
|
String tokenHash,
|
|
EmailLinkType type,
|
|
);
|
|
|
|
Future<Result<void, AuthFailure>> setNewPassword(String password);
|
|
|
|
/// Beendet den Recovery-Guard nach erfolgreich gesetztem Passwort (die
|
|
/// Sitzung bleibt bestehen). Ohne laufende Recovery ohne Wirkung.
|
|
void finishPasswordRecovery();
|
|
|
|
/// Meldet lokal ab (u. a. beim Abbruch der Recovery). Fehler werden nur
|
|
/// geloggt.
|
|
Future<void> signOut();
|
|
}
|