Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Need help to use feathers authentication storage in vue vuex #329

Closed
kieusonlam opened this issue Oct 24, 2016 · 5 comments
Closed

Need help to use feathers authentication storage in vue vuex #329

kieusonlam opened this issue Oct 24, 2016 · 5 comments

Comments

@kieusonlam
Copy link

I'm trying to intergrate feathers with vue + vuex. I got confused about define local storage for feathers authentication. You guys can take a look at my repo:

https://github.com/kieusonlam/vue-feathers-wepack

This file I created for feathers client
vue-feathers-wepack/client/store/feathers.js
if i change storage to localStorage or window.localStorage i will get this error

window.localStorage is not defined

And here is the store i make for feathers authentication
vue-feathers-wepack/client/store/modules/auth.js

@daffl
Copy link
Member

daffl commented Oct 24, 2016

That problem might occur if you are running your browser in private or incognito mode. Related: #135

@kieusonlam
Copy link
Author

My problem is about server side rending, i solved it. Thank you for reply 👍 Good to know that problem too.

@andycaramba
Copy link

Hi @kieusonlam
Could you explain how you solved this issue?

@kieusonlam
Copy link
Author

Hi @andycaramba

I just make it running on client side only by using process.env you can take a look at here.

https://github.com/kieusonlam/vue-feathers-wepack/blob/master/client/store/feathers.js

@andycaramba
Copy link

Thank you @kieusonlam

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants