websanova / vue-auth

A simple light-weight authentication library for Vue.js
MIT License
2.36k stars 380 forks source link

Call method from vuex module in Vue 3 #666

Open fabianlugones opened 3 years ago

fabianlugones commented 3 years ago

Hi. I love this package and I've work a lot with it :). Thanks for that ! Last week I've started working in a new Vue 3 project. This is the first time that I do Vue 3 and I have one problem: I want to call the vue-auth's login method from a Vuex Module. I've read the vue-auth Upgrade section and the Vue 3 example code (in this example the Vuex store has no modules in it) and I couldn't find a way to do it.

I'm using Vuex 4 and vue-auth 4 with Vue 3.

I will paste code for a "Vue 2 way of solving this issue"

vue auth auth js at master · websanova vue auth

Thanks in advance!

websanova commented 3 years ago

@fabianlugones take a look here: https://github.com/websanova/vue-auth/issues/658

Someone was having similar issue.