completeAuthentication abstract method
Completes the authentication process of a user, by verifying the provided validation code and :
- In the case of a sign-up, create the user data;
- In the case of a login, re-generate keys if needed (new keys different from previous ones);
Parameters
process
The AuthenticationProcess previously provided in the startAuthentication servicevalidationCode
The validation code the user received by email/mobile phoneuserKeyPair
The key pairprivate, public
that will be used by the user to encrypt/decrypt data;tokenAndKeyPairProvider
A custom function to generate an authentication token and a key pair for user
Returns
- The result of the authentication and the related MedTechApi object corresponding to the newly authenticated user.
Implementation
Future<AuthenticationResult> completeAuthentication(AuthenticationProcess process, String validationCode, Tuple2<String, String> userKeyPair,
Future<Tuple3<String, String, String>?> Function(String, String) tokenAndKeyPairProvider);