Add post-connect UI to login via SASL

If the server supports SASL and if we aren't logged in with any
account, add a UI to authenticate via SASL. This allows users to
login anonymously then login via SASL.

This will also ease the draft/account-registration implementation.
This commit is contained in:
Simon Ser 2021-11-21 16:40:46 +01:00
parent 24b50a332c
commit 3e2ac307f6
4 changed files with 120 additions and 3 deletions

View file

@ -256,6 +256,7 @@ export const State = {
isupport: new Map(),
users: new irc.CaseMapMap(null, irc.CaseMapping.RFC1459),
account: null,
supportsSASLPlain: false,
});
return [id, { servers }];
},
@ -346,6 +347,8 @@ export const State = {
};
}),
};
case "CAP":
return updateServer({ supportsSASLPlain: client.supportsSASL("PLAIN") });
case irc.RPL_LOGGEDIN:
return updateServer({ account: msg.params[2] });
case irc.RPL_LOGGEDOUT: