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
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
class AuthUser {
|
||||
final String id;
|
||||
final String email;
|
||||
final String phone;
|
||||
|
||||
const AuthUser({required this.id, required this.email});
|
||||
const AuthUser({required this.id, required this.phone});
|
||||
|
||||
factory AuthUser.fromJson(Map<String, dynamic> json) {
|
||||
return AuthUser(id: json['id'] as String, email: json['email'] as String);
|
||||
return AuthUser(id: json['id'] as String, phone: json['phone'] as String);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,13 +34,3 @@ class AuthResponse {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class VerificationCreateResponse {
|
||||
final String email;
|
||||
|
||||
const VerificationCreateResponse({required this.email});
|
||||
|
||||
factory VerificationCreateResponse.fromJson(Map<String, dynamic> json) {
|
||||
return VerificationCreateResponse(email: json['email'] as String);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user