feat: SMS OTP phone auth + mandatory phone verification gate
- MyUser: add isPhoneVerified field (from is_phone_verified in API) - ApiUserRepository: signInWithPhoneNumber calls POST /auth/send-otp, verifyOTP calls POST /auth/phone, linkWithOTP calls POST /auth/verify-phone Added updateFcmToken and changePassword methods - AuthBloc: remove Firebase PhoneVerificationService, use repository OTP flow - app_view.dart: gate authenticated users without verified phone to PhoneVerifyRequiredScreen before showing HomeScreen - welcome_screen.dart: full redesign with gradient header, logo, integrated OTP flow (phone → code in same screen), 60s resend timer - PhoneVerifyRequiredScreen: new screen for users who need to verify phone Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
38beca4b4f
commit
2c5b237890
@@ -14,11 +14,13 @@ class AuthenticationBloc extends Bloc<AuthenticationEvent, AuthenticationState>
|
||||
|
||||
AuthenticationBloc({required UserRepository myUserRepository})
|
||||
: userRepository = myUserRepository,
|
||||
super(const AuthenticationState.unknown()) {_userSubscription = userRepository.streamUser().listen((authUser) {
|
||||
super(const AuthenticationState.unknown()) {
|
||||
_userSubscription = userRepository.streamUser().listen((authUser) {
|
||||
add(AuthenticationUserChanged(authUser));
|
||||
});
|
||||
on<AuthenticationUserChanged>(_onAuthenticationUserChanged);
|
||||
on<AuthenticationLogoutRequested>(_onAuthenticationLogoutRequested);
|
||||
userRepository.isAuthenticated().listen((_) {});
|
||||
}
|
||||
|
||||
void _onAuthenticationUserChanged(
|
||||
|
||||
Reference in New Issue
Block a user