This is the sample repository related to https://codeburst.io/nuxt-authentication-from-scratch-a7a024c7201b.
nuxt-auth-from-scratch's Introduction
nuxt-auth-from-scratch's People
Forkers
tamacroft schubertyann rikoz miq3l stevepop nataliit mariustudorache gitincognito ericsonweah kirigokaranja kecheon innomatrix nhasaan giovannimanzoni alexshvid phalbert huzaifanahas kenlock jocelyn10nuxt-auth-from-scratch's Issues
Endless loop on logout
Hi have you try to use logout functionality, because I have some problems with that.
When I dispatching me.$store.dispatch("auth/reset") I ended up with endless loop inside auth midleware on line
return redirect("/login");
Can you please give me any hints what the problem it could be?
Token required on post
So I have created a post.vue page where I can submit text and title to the server. I am getting 500 response which indicates I am not providing token to the post request.
If I remove the need for a token on server side, I successfully post and create a new record in the db.
I have tried everything to submit with the header and auth token however now I am without the ideas of what to do in order to resolve this issue.
Any ideas / help please?
edit: This page is available only to already logged in users.
Thanks
token is lost after refresh
Since my back end expects Authorization Bearer token, I changed x-access-token to Authorization. Everything works fine but on refresh, token is lost and it logs me out.
What am I missing?
Help, please! :)
nuxtServerInit resolving true before api.auth.me() promise returned
Hey @Kasheftin thanks for this guide, it is absolutely awesome.
I've found a bug (maybe it's not?) where full page reloads within admin are causing this line:
to evaluate to false.
The problem seems to be that this line:
is returning before the
api.auth.me()
promise is resolved here:Consequence is that commit('set_user', response.data.result)
is never committed and const userIsLoggedIn = !!store.state.auth.user
becomes false
.
What are your thoughts?
Docker Access to XMLHttpRequest at '' has been blocked by CORS policy
Hi and first, thank you for your tutorial.
I try to dockerize your app and I am stuck with this error:
XMLHttpRequest at '' has been blocked by CORS policy when I click on login
I have 4 containers:
- Frontend (nuxt)
- Backend (node)
- Database
- nginx proxy
run with docker-compose
I modified slightly your code by adding npm cors package to allow cors in backend/server.js
var corsOptions = {
"origin": "*",
"methods": "GET,HEAD,PUT,PATCH,POST,DELETE",
"allowedHeaders": ['Content-Type, Content-Length, x-access-token'],
"preflightContinue": true,
"optionsSuccessStatus": 204
}
const app = express()
app.use(cors(corsOptions))
with no success.
Any idea
Does placing code in frontend/middleware/auth.js open you up to an attack?
Doesn't placing code in frontend/middleware/auth.js open you up to an attack, as all client-side code can be easily modified by an attacker in the browser?
Please fix typo
Please change
error.response.data.message || error.reponse.status
to
error.response.data.message || error.response.status
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.