diff --git a/lib/matrix_api/matrix_api.dart b/lib/matrix_api/matrix_api.dart index c3dd5f04..a8ae5c1c 100644 --- a/lib/matrix_api/matrix_api.dart +++ b/lib/matrix_api/matrix_api.dart @@ -257,6 +257,7 @@ class MatrixApi { String token, String deviceId, String initialDeviceDisplayName, + Map auth, }) async { final response = await request(RequestType.POST, '/client/r0/login', data: { 'type': type, @@ -272,6 +273,7 @@ class MatrixApi { if (deviceId != null) 'device_id': deviceId, if (initialDeviceDisplayName != null) 'initial_device_display_name': initialDeviceDisplayName, + if (auth != null) 'auth': auth, }); return LoginResponse.fromJson(response); } diff --git a/lib/src/client.dart b/lib/src/client.dart index 4d9f5703..251e0c2b 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -348,6 +348,7 @@ class Client extends MatrixApi { String token, String deviceId, String initialDeviceDisplayName, + Map auth, }) async { final loginResp = await super.login( type: type, @@ -359,6 +360,7 @@ class Client extends MatrixApi { medium: medium, address: address, token: token, + auth: auth, ); // Connect if there is an access token in the response.