Closed SankethBK closed 9 months ago
Hey @SankethBK , Can you assign this to me, I have already implemented similar feature in native android.
Sure @msaqeeb72 , this depends on first part of the issue. See if you can mock / hardcode the dependant functions, till first part is completed
I will write UI and functions and tested it with mock pin.
Cool, that'd be great
Hello can I work on this as well please, I'm working on authentication part 1 and this would be an extension of it! Thank you
Sure @LujainAlMansoori
In first part of this issue, user enables the PIN based authentication and has setup a 4 digit PIN.
In this part we need to implement the authentication screen to collect and validate PIN during login.
1. Create a new screen to collect 4 digit PIN, (something like this, keep it consistent with themes)
If the "PIN-based authentication" is enabled, we should redirect user to PIN login screen instead of email+password login screen. In order to check if PIN based authentication is enabled, we need to read
userConfigModel
from shared preferences and check itsisPINLoginEnabled
(similar thing is done to check if fingerprint login is enabled, checkshouldActivateFingerPrint
)Create
shouldredirectToPINAuthScreen
inPINAuthRepository
similar toshouldActivateFingerPrint
.2. Verifying PIN and login
Create_PIN) If the PIN stored in secure_storage matches the PIN entered by user, we need to emit
verifyPIN
method inPINAuthRepository
, this method should read the PIN stored in flutter_secure_storage in the form of key:value pairs (key would be in the form ofUserLoggedIn
event onauthSessionBloc
to start a login session with givenuser
.