-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Has your issue been reported?
- I have searched the existing issues and confirm it has not been reported.
- I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.
Current Behavior
New user registering for the first time via Firebase SMS Auth. As soon as the user receives SMS code and enters into SMS verification field and tap submit...receive an error that SMS Code has been expired.
Expected Behavior
SMS code to be verified and pushed to the next screen
Steps To Reproduce
- Download App
- Sign up as a new user
- Enter Phone number and hit next
- Enter the SMS code that has been received
Bug Report Code
Padding( padding: EdgeInsetsDirectional.fromSTEB(0, 24, 0, 0), child: FFButtonWidget( onPressed: () async { logFirebaseEvent('USER_S_M_S_VERIFY_PAGE_SMSButton_ON_TAP'); Function() _navigate = () {}; logFirebaseEvent('SMSButton_auth'); GoRouter.of(context).prepareAuthEvent(); final smsCodeVal = _model.phoneSMSTextFieldController.text; if (smsCodeVal == null || smsCodeVal.isEmpty) { ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text('Enter SMS verification code.'), ), ); return; } final phoneVerifiedUser = await verifySmsCode( context: context, smsCode: smsCodeVal, ); if (phoneVerifiedUser == null) { return; } _navigate = () => context.goNamedAuth('Main', mounted); if (FFAppState().langSelected == null || FFAppState().langSelected == '') { logFirebaseEvent('SMSButton_update_app_state'); FFAppState().update(() { FFAppState().langSelected = 'tr'; }); } if (widget.type == 'new') { logFirebaseEvent('SMSButton_update_app_state'); FFAppState().update(() { FFAppState().newUserToRegister = true; FFAppState().newPlaceName = widget.userPlaceName!; }); logFirebaseEvent('SMSButton_update_app_state'); FFAppState().update(() { FFAppState().newPlaceAddress = widget.userPlace!.address; FFAppState().newPlaceCity = widget.userCity!; }); logFirebaseEvent('SMSButton_update_app_state'); FFAppState().update(() { FFAppState().newPlaceState = widget.userPlace!.state; FFAppState().newPlaceCountry = widget.userPlace!.country; }); logFirebaseEvent('SMSButton_update_app_state'); FFAppState().update(() { FFAppState().newPlaceZipcode = widget.userPlace!.zipCode; FFAppState().newPlaceArea = widget.userArea!; }); logFirebaseEvent('SMSButton_update_app_state'); FFAppState().update(() { FFAppState().newPlaceCounty = widget.userCounty!; FFAppState().newUserFullname = valueOrDefault( widget.fullname, 'Anonymous', ); }); logFirebaseEvent('SMSButton_update_app_state'); FFAppState().update(() { FFAppState().newUserLocation = widget.userPlace!.latLng; }); logFirebaseEvent('SMSButton_show_snack_bar'); ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( 'Your account has been created', style: TextStyle( color: FlutterFlowTheme.of(context).primaryBackground, ), ), duration: Duration(milliseconds: 4000), backgroundColor: FlutterFlowTheme.of(context).primaryColor, ), ); } _navigate(); }, text: FFLocalizations.of(context).getText( '4bawtgyr' /* Verify Phone Number */, ), options: FFButtonOptions( width: 340, height: 45, padding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0), iconPadding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0), color: FlutterFlowTheme.of(context).deepSpaceSparkle, textStyle: FlutterFlowTheme.of(context).subtitle2.override( fontFamily: 'Poppins', color: Colors.white, fontWeight: FontWeight.w500, ), borderSide: BorderSide( color: Colors.transparent, width: 1, ), borderRadius: BorderRadius.circular(8), ), ), )
Context
Only users with Samsung devices, randomly, have been affected by this where they receive this message. But the system authenticates them in the background.
Per my research, Samsung can automatically login the user as soon as the device receives SMS code "instant verification" but then the UI doesn't reflect that. Here is an example of some other developer having similar issue: https://stackoverflow.com/questions/75599234/firebase-phone-auth-sms-code-expired-in-some-devices
Additional info
No response
Environment
- FlutterFlow version: 3.1 - 3.7.3
- Platform: MacOS Desktop
- Browser name and version: Chrome
- Operating system and version affected: macOS Monetary latest