Comments (2)
Hi @rbracco. Thanks for pointing this out, you are totally right. Even I'm pretty new to auth in js and I had my own reservations with this approach as well. One important thing to note is that this project is not suitable for production (obviously).
I will try to look into this problem when time permits and search for the best practices. If you are able to fix this problem in your project, then I will really appreciate it if you share your solution or perhaps create a pull request.
Also, it'll be great if you can raise a similar request in Buuntu's FastAPI-React Project
That is the original project from where I took this code and it has a much more active and experienced group of people.
Btw, you can explore Amazon Cognito or something similar to get much more secure and easier way to auth users.
Cheers!
from fastapi-react-mongodb.
Thank you for the reply and feedback. I eventually realized this code came from FastAPI-React and so I opened an issue there as well. If I come up with a solution I will reopen and post here. For now I think the best way is to store the token locally and have isAuthenticated
make a request to our Users router to validate the token. I will suggest that in the other thread and see if some of the more experienced people have input. Cheers.
from fastapi-react-mongodb.
Related Issues (1)
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.
from fastapi-react-mongodb.