signIn method
- UserLogin? login,
- UserNum? num,
- UserEmail? email,
- UserPhone? phone,
- UserPassword? password,
- ConfirmationCode? code,
override
Creates a new Session for the MyUser identified by the provided
num/login/email/phone (exactly one of four should be specified).
Implementation
@override
Future<Credentials> signIn({
UserLogin? login,
UserNum? num,
UserEmail? email,
UserPhone? phone,
UserPassword? password,
ConfirmationCode? code,
}) async {
Log.debug(
'signIn(password: ${password?.obscured}, code: $code, login: $login, num: $num, email: ${email?.obscured}, phone: ${phone?.obscured})',
'$runtimeType',
);
final response = await _graphQlProvider.signIn(
credentials: MyUserCredentials(code: code, password: password),
identifier: MyUserIdentifier(
login: login,
num: num,
phone: phone,
email: email,
),
);
_myUserProvider.upsert(response.user.toDto());
return response.toModel();
}