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 res = await _api.v2AccountAuthenticateSteamPost(
body: ApiAccountSteam(token: token, vars: vars),
create: create,
username: username,
$sync: import,
);
if (res.body == null) {
throw Exception('Authentication failed.');
}
final data = res.body!;
return model.Session.fromApi(data);
}