Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared mutation with Auth module in nuxt #27

Open
saint777 opened this issue Nov 28, 2019 · 1 comment
Open

Shared mutation with Auth module in nuxt #27

saint777 opened this issue Nov 28, 2019 · 1 comment

Comments

@saint777
Copy link

Is it possible to make all tabs to show logged in if user is logged in?

I'm using this.$auth.loginWith to login a user

@coldfission
Copy link

I've created an example app that shows how to do this with a local auth scheme: https://github.com/coldfission/nuxt-auth-shared-example

The usage of this vuex-shared-mutations package can be seen here: https://github.com/coldfission/nuxt-auth-shared-example/blob/master/plugins/auth.js

Note: I'm not comfortable with the code setting the token to null instead of false, but it does work. I feel like nuxt-auth setting this to null instead of false would be an improvement for those of us extending the module to this extent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants