refactor: Update sdk
This commit is contained in:
parent
1cc5496849
commit
11c2a8bb26
8 changed files with 58 additions and 75 deletions
|
|
@ -137,16 +137,19 @@ class _LoginState extends State<Login> {
|
|||
],
|
||||
);
|
||||
if (password == null) return;
|
||||
final threepidCreds = {
|
||||
'client_secret': clientSecret,
|
||||
'sid': (response as RequestTokenResponse).sid,
|
||||
};
|
||||
final success = await SimpleDialogs(context).tryRequestWithLoadingDialog(
|
||||
Matrix.of(context).client.changePassword(password.single, auth: {
|
||||
'type': 'm.login.email.identity',
|
||||
'threepidCreds': threepidCreds, // Don't ask... >.<
|
||||
'threepid_creds': threepidCreds,
|
||||
}),
|
||||
Matrix.of(context).client.changePassword(
|
||||
password.single,
|
||||
auth: AuthenticationThreePidCreds(
|
||||
type: AuthenticationTypes.emailIdentity,
|
||||
threepidCreds: [
|
||||
ThreepidCreds(
|
||||
sid: (response as RequestTokenResponse).sid,
|
||||
clientSecret: clientSecret,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
if (success != false) {
|
||||
FlushbarHelper.createSuccess(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue