Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VER-446] fix: Correctly logout OAuth client on logout notification #188

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/browser/src/background/main.background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,11 @@ export default class MainBackground {
}
//*/

// Cozy customization, logout OAuth client
//*
await this.cozyClientService.logout();
//*/

await Promise.all([
this.syncService.setLastSync(new Date(0), userId),
this.cryptoService.clearKeys(userId),
Expand Down
1 change: 0 additions & 1 deletion apps/browser/src/background/runtime.background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ export default class RuntimeBackground {
break;
case "logout":
// 1- logout
await this.cozyClientService.logout();
await this.main.logout(msg.expired, msg.userId);
// 2- ask all frames of all tabs to activate login-in-page-menu
for (const tab of await BrowserApi.getAllTabs()) {
Expand Down
Loading