readonly login sessions

This commit is contained in:
2023-09-23 22:21:37 +01:00
parent 3efb5321f6
commit 94da60ebfa
30 changed files with 217 additions and 119 deletions

View File

@ -384,12 +384,12 @@ export class Connection extends ExternalStore<ConnectionStateSnapshot> {
}
this.AwaitingAuth.set(challenge, true);
const authEvent = await this.Auth(challenge, this.Address);
return new Promise(resolve => {
if (!authEvent) {
authCleanup();
return Promise.reject("no event");
}
if (!authEvent) {
authCleanup();
throw new Error("No auth event");
}
return await new Promise(resolve => {
const t = setTimeout(() => {
authCleanup();
resolve();