authenticateSteam method
Future<Session>
authenticateSteam({
- required String token,
- bool create = true,
- String? username,
- Map<
String, String> ? vars, - bool import = false,
override
Authenticate with steam token
Set import
to true
to import friends.
Implementation
@override
Future<model.Session> authenticateSteam({
required String token,
bool create = true,
String? username,
Map<String, String>? vars,
bool import = false,
}) async {
final request = api.AuthenticateSteamRequest()
..create_2 = api.BoolValue(value: create)
..sync = api.BoolValue(value: import)
..account = (api.AccountSteam()
..token = token
..vars.addAll(vars ?? {}));
if (username != null) {
request.username = username;
}
final res = await _client.authenticateSteam(request);
return model.Session.fromDto(res);
}