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
When feathersVuex is configured with nameStyle: 'short' and the user service contains a path-like name, e.g v1/users the authorization process fails to generate the getters (user and isAuthenticated) because it's unable to find the correct rootState.
The method makeAuthGetters should take into consideration the nameStyle (as makeServicePlugin already does with makeNamespace) and sanitize the passed data.
The error is Error: rootState[userService] is undefined, within the file auth-module.getters
The authentication process should set the getters correctly. makeAuthGetters should access the nameStyle option and transform the userService accordingly
Steps to reproduce
When feathersVuex is configured with
nameStyle: 'short'
and the user service contains a path-like name, e.gv1/users
the authorization process fails to generate the getters (user
andisAuthenticated
) because it's unable to find the correct rootState.The method
makeAuthGetters
should take into consideration thenameStyle
(asmakeServicePlugin
already does withmakeNamespace
) and sanitize the passed data.The error is
Error: rootState[userService] is undefined
, within the fileauth-module.getters
Expected behavior
The authentication process should set the getters correctly.
makeAuthGetters
should access thenameStyle
option and transform the userService accordinglyFor example:
Actual behavior
makeAuthGetters
tryes to access the rootState with a userService containing a slash charachter (e.g.rootState['v1/users']
), hence throwing an error.DevTools screenshot
System configuration
Module versions (especially the part that's not working):
Vue.js DevTools 6.0.0.20
NodeJS version: v16.13.0
Operating System: Fedora Linux 35 (Workstation Edition)
Browser Version: Firefox 94
Module Loader: Webpack
The text was updated successfully, but these errors were encountered: