koa
with koa-passport
, and succeed authentication return ctx.body = {success: true}
to client. Needed more? Needed token?
ctx.login(user)
?
All session data in cookies? 0_o
- JWT is stored in either localStorage
, sessionStorage
or in app memory. Custom made cookieStorage
is yet to be released in some future version.
TypeError: Cannot read property 'authenticate' of undefined
: https://stackoverflow.com/questions/46940420/vueauthenticate-uncaught-typeerror-cannot-read-property-login-of-undefined
Vue.use(VueAuthenticate)
import VueAuthenticate from 'vue-authenticate'
import { VueAuthenticate } from 'vue-authenticate'
const vueAuth = new VueAuthenticate(VueResource, {})
I have always the same problem.
main.js: https://pastebin.com/SQtVx6Kg
auth.js: https://pastebin.com/vyvm3MLA
store.js: https://pastebin.com/YNq21nkc
import VueAuthenticate from 'vue-authenticate'
this.$http.interceptors
use $auth.$http.intercerceptors