You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am following the instructions at Optional: setup oidc-client event listeners to catch the userLoaded event. When this happens I want to make a call to my back-end api to retrieve other user-related data I want to add to the store. Can I access the store from within one of these event handlers, or do I need to catch the window event from elsewhere in my program and access the store from there?
The text was updated successfully, but these errors were encountered:
@korggy we have a separate listeners file. There we can import store instance and use it within event handler functions.
Or this kind of syntax can work within a callback function:
// eslint-disable-next-line global-requireconststore=require('@/store').useStore();// Oidc store module created with option namespaced: trueconsttoken=store.state.oidc.access_token;
If your src/store/index.js has a function to return the store instance...perhaps in this case you could just export store constant, but this follows Vue 3 Composition API and composable style use function architecture.
I am following the instructions at Optional: setup oidc-client event listeners to catch the userLoaded event. When this happens I want to make a call to my back-end api to retrieve other user-related data I want to add to the store. Can I access the store from within one of these event handlers, or do I need to catch the window event from elsewhere in my program and access the store from there?
The text was updated successfully, but these errors were encountered: