feat: Implement UIA for login
This commit is contained in:
parent
b0043ea0e4
commit
ac4cded10f
|
|
@ -257,6 +257,7 @@ class MatrixApi {
|
|||
String token,
|
||||
String deviceId,
|
||||
String initialDeviceDisplayName,
|
||||
Map<String, dynamic> 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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -348,6 +348,7 @@ class Client extends MatrixApi {
|
|||
String token,
|
||||
String deviceId,
|
||||
String initialDeviceDisplayName,
|
||||
Map<String, dynamic> 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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue