Files
social-app/apps/lib/features/auth/data/auth_repository.dart
T
qzl 0661016827 feat(auth): transition from email to phone-based OTP authentication
- 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
2026-03-19 18:42:05 +08:00

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();
}