0661016827
- Replace Email+Password login with Phone+OTP flow - Remove RegisterCubit and registration screens (email verification) - Remove ResetPasswordCubit and reset password screens - Add phone normalization and international dial code support - Update LoginCubit with sendCode/resend cooldown logic - Add new widgets: phone prefix selector, confirm sheet - Update all auth API endpoints: /otp/send, /phone-session - Update form inputs: Email -> Phone with E.164 validation - Update tests for new auth flow
16 lines
490 B
Dart
16 lines
490 B
Dart
import 'package:social_app/features/auth/data/models/auth_response.dart';
|
|
|
|
abstract class AuthRepository {
|
|
Future<void> sendOtp(String phone);
|
|
Future<AuthResponse> createPhoneSession({
|
|
required String phone,
|
|
required String token,
|
|
});
|
|
Future<AuthResponse> refreshSession(String refreshToken);
|
|
Future<void> deleteSession();
|
|
Future<void> clearSessionLocalOnly();
|
|
Future<String?> getAccessToken();
|
|
Future<String?> getRefreshToken();
|
|
Future<bool> isAuthenticated();
|
|
}
|