feat(registration): added email verification, feat(diary): fixed moderation request, feat(oauth): fixed email and phone verification

This commit is contained in:
misha
2025-12-25 16:31:52 +03:00
parent 99659f7ea1
commit 0ead14bca5
18 changed files with 148 additions and 165 deletions

View File

@@ -3,20 +3,18 @@ import 'package:eatvio_app/features/auth/models/oauth_login_request.dart';
import 'package:eatvio_app/features/auth/models/oauth_model.dart';
import 'package:eatvio_app/features/auth/models/oauth_verification_confirm_request.dart';
import 'package:eatvio_app/features/auth/models/oauth_verification_confirm_response.dart';
import 'package:eatvio_app/features/auth/models/oauth_verification_request.dart';
import 'package:eatvio_app/features/auth/models/oauth_verification_request_response.dart';
import 'package:eatvio_app/features/auth/models/token_model.dart';
import 'package:eatvio_app/features/auth/repositories/auth_repository.dart';
import 'package:eatvio_app/features/auth/services/auth_service.dart';
/// Fixture-based replacement for [AuthRepository].
///
/// - Records every credential payload that would be sent to the backend.
/// - Returns data loaded from fixture files so QA/backenders can see
/// exactly what is exchanged.
class FixtureAuthRepository extends AuthRepository {
FixtureAuthRepository({
required this.tokenFixture,
}) : super(authService: _NoopAuthService());
FixtureAuthRepository({required this.tokenFixture}) : super(authService: _NoopAuthService());
final TokenModel tokenFixture;
@@ -45,10 +43,7 @@ class CredentialsCall {
final String email;
final String password;
Map<String, String> toJson() => <String, String>{
'email': email,
'password': password,
};
Map<String, String> toJson() => <String, String>{'email': email, 'password': password};
}
class _NoopAuthService implements AuthService {
@@ -68,7 +63,7 @@ class _NoopAuthService implements AuthService {
}
@override
Future<OAuthVerificationRequestResponse> requestOAuthVerification({required OAuthVerificationRequest body}) {
Future<OAuthVerificationRequestResponse> requestOAuthVerification({required Map<String, dynamic> body}) {
throw UnimplementedError('Not implemented in fixture.');
}
@@ -77,4 +72,3 @@ class _NoopAuthService implements AuthService {
throw UnimplementedError('Not implemented in fixture.');
}
}