Closed SankethBK closed 9 months ago
I am working on this issue, Please assign it to me.
Sure @abhinavs1920
Hello @SankethBK, could you please assign me to this, I have experience working with this feature!
Sure @LujainAlMansoori
Hey @SankethBK this has been resolved! Please check PR #161
Currently, we support email+password and fingerprint login. PIN-based authentication will help in devices that don't support fingerprint login, as typing email+password every time would be tedious.
I have broken down this into two issues since this is a relatively big feature.
1. Add "Enable PIN-based login"
SwitchListTile
in security settingsWe store all user-based settings in
UserConfigModel
, add a new fieldisPINLoginEnabled
to store the value ofSwtichListTile
When user enables this switch we need to check if
userId
(present inUserConfigCubit
) is not equal toguest_user_id
. Becuase if guest users forget their PIN, there is no way to recover the data (Same check is also added to "Enable Fingeprint Login"SwitchListTile
).2. Display a popup like this to collect 4-digit PIN
Keyboard should only display numbers, add validation to check if both PINs are matching, otherwise display error in a error message. Refer
passwordResetPopup
, most parts of this widget can be re-used.3, Saving the PIN
Create a new repository_PIN) so that it PIN's of two user's don't clash.
PINAuthRepository
inlib/features/auth/data/repositories
and implementsavePIN
inPINAuthRepository
and store it in flutter_secure_storage in the form of key:value pairs, IncludeuserId
in key (eg: