authenticateDevice method
Implementation
@override
Future<model.Session> authenticateDevice({
required String deviceId,
bool create = true,
String? username,
Map<String, String>? vars,
}) async {
final request = AuthenticateDeviceRequest()
..create_2 = BoolValue(value: create)
..account = (AccountDevice()
..id = deviceId
..vars.addAll(vars ?? {}));
if (username != null) {
request.username = username;
}
final res = await _client.authenticateDevice(request);
return model.Session(
created: res.created,
token: res.token,
refreshToken: res.refreshToken,
);
}