login method

  1. @override
Future<Either<Failure, Token>> login({
  1. bool refreshIfAvailable = false,
})
override

Perform Azure AD login.

Setting refreshIfAvailable to true will attempt to re-authenticate with the existing refresh token, if any, even though the access token may still be valid. If there's no refresh token the existing access token will be returned, as long as we deem it still valid. In the event that both access and refresh tokens are invalid, the web gui will be used.

Implementation

@override
Future<Either<Failure, Token>> login(
    {bool refreshIfAvailable = false}) async {
  await _removeOldTokenOnFirstLogin();
  return await _authorization(refreshIfAvailable: refreshIfAvailable);
}