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

Refresh / flush Vuex store when Druxt Auth user logout. #684

Open
Decipher opened this issue Nov 8, 2023 · 0 comments
Open

Refresh / flush Vuex store when Druxt Auth user logout. #684

Decipher opened this issue Nov 8, 2023 · 0 comments
Labels
enhancement New feature or request module: druxt Related to the `druxt` module module: menu Related to the `druxt-menu` module

Comments

@Decipher
Copy link
Member

Decipher commented Nov 8, 2023

Is your feature request related to a problem? Please describe.
When a user logs out via the Druxt Auth integration, the Vuex stores persist.

Describe the solution you'd like
Some way to universally flush the Vuex stores that can be used by modes such as Druxt Auth.

Describe alternatives you've considered
Triggering a manual page reload after the Nuxt Auth logout call in the frontend.

Additional context
The Druxt Store already has the ability to flush resources and collections from the store: https://github.com/druxt/druxt.js/blob/develop/packages/druxt/src/stores/druxt.js#L144-L180

Other Vuex stores will also need this ability.

@Decipher Decipher added enhancement New feature or request module: menu Related to the `druxt-menu` module module: druxt Related to the `druxt` module labels Nov 8, 2023
Decipher added a commit that referenced this issue Jan 8, 2024
Decipher added a commit that referenced this issue Jan 8, 2024
Decipher added a commit that referenced this issue Jan 8, 2024
* feat(#684): add druxtMenu/flushEntities mutation

* chore(#684): ensure state.entities is object

* chore(#684): add tests

* chore(#684): update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module: druxt Related to the `druxt` module module: menu Related to the `druxt-menu` module
Projects
None yet
Development

No branches or pull requests

1 participant