tokenLogin static method
Implementation
static Future<Login> tokenLogin(String token) async {
final jwt = JWToken(token);
final tokens = await api.refreshToken(token);
return Login(
Platform.mobile,
tokens.accessToken,
tokens.refreshToken,
User(int.parse(jwt.userId)),
);
}