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

Conversation

Ldoppea
Copy link
Member

@Ldoppea Ldoppea commented Apr 22, 2024

When doing a logout we wan't the extension to also logout the Cozy's Oauth client

This was done from the runtime.background.ts file so the action is done when the user clicks on the Settings logout button

But this is not the only scenario that can produce a logout

This is the case when the user changes their password from cozy-settings. In that scenario, the cozy-stack will send a logout notification to the Bitwarden's realtime stream, and so the extension will react by doing a logout

To have the OAuth logout on both scenario we want to move the related code into main.background.ts

When doing a logout we wan't the extension to also logout the Cozy's
Oauth client

This was done from the `runtime.background.ts` file so the action is
done when the user clicks on the Settings logout button

But this is not the only scenario that can produce a logout

This is the case when the user changes their password from
cozy-settings. In that scenario, the cozy-stack will send a `logout`
notification to the Bitwarden's realtime stream, and so the extension
will react by doing a logout

To have the OAuth logout on both scenario we want to move the related
code into `main.background.ts`
@Ldoppea Ldoppea marked this pull request as ready for review April 22, 2024 15:17
@Ldoppea Ldoppea changed the title fix: Correctly logout OAuth client on logout notification [VER-446] fix: Correctly logout OAuth client on logout notification Apr 22, 2024
@Ldoppea Ldoppea merged commit b56e055 into feat/stream1 Apr 23, 2024
1 check passed
@delete-merged-branch delete-merged-branch bot deleted the fix/logout_on_password_change branch April 23, 2024 10:01
@zatteo
Copy link

zatteo commented Apr 23, 2024

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants