authenticateFacebook method
Future<Session>
authenticateFacebook({
- required String token,
- bool create = true,
- String? username,
- Map<
String, String> ? vars, - bool import = false,
override
Implementation
@override
Future<model.Session> authenticateFacebook({
required String token,
bool create = true,
String? username,
Map<String, String>? vars,
bool import = false,
}) async {
final request = AuthenticateFacebookRequest()
..create_2 = BoolValue(value: create)
..sync = BoolValue(value: import)
..account = (AccountFacebook()
..token = token
..vars.addAll(vars ?? {}));
if (username != null) {
request.username = username;
}
final res = await _client.authenticateFacebook(request);
return model.Session(
created: res.created,
token: res.token,
refreshToken: res.refreshToken,
);
}