also emite attempted when no sessions

This commit is contained in:
Dallin Romney 2025-07-17 00:02:14 +02:00
parent ba77b09916
commit a262486596

View file

@ -206,9 +206,12 @@ export class WorkOsAuthProvider implements AuthenticationProvider, Disposable {
}
}
// It is important that every path in this function emits the attempted event
// As config loading in core will be locked until refresh is attempted
private async _refreshSessions(): Promise<void> {
const sessions = await this.getSessions();
if (!sessions.length) {
this.attemptEmitter.emit("attempted");
return;
}