websanova / vue-auth

A simple light-weight authentication library for Vue.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Call method from vuex module in Vue 3

fabianlugones opened this issue · comments

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!

@fabianlugones take a look here: #658

Someone was having similar issue.