Git Product home page Git Product logo

ankushjain2001 / fastapi-react-mongodb Goto Github PK

View Code? Open in Web Editor NEW
93.0 3.0 20.0 204 KB

A minimal FARM stack boilerplate / template project to get you started with a Python FastAPI backend, React frontend, MongoDB, and JWT user authentication (via FastAPIUsers).

Python 29.11% HTML 7.39% JavaScript 61.91% CSS 1.59%
fastapi fastapi-boilerplate fastapi-template fastapi-mongodb mongodb react reactjs react-template authentication fastapi-users

fastapi-react-mongodb's Introduction

Hello there! ๐Ÿ‘‹

  • ๐Ÿ”ญ Iโ€™m currently working on AWS and some fun ML & NLP use-cases like Q&A, text classification, and natural language search
  • ๐Ÿ’ฌ Ask me about Machine Learning, NLP, and Neural Networks
  • ๐ŸŒฑ Iโ€™m currently learning AWS
  • ๐Ÿ˜„ Pronouns: He/Him/His
  • โšก Fun fact: Accio facts! ๐Ÿ˜‰

linkedin badge

fastapi-react-mongodb's People

Contributors

ankushjain2001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fastapi-react-mongodb's Issues

Potential problem with auth

Hi, I'm new to auth in js so I may be mistaken here, but isn't it dangerous to authenticate by checking a plain string permissions in localStorage as is done below in auth.js? Can't the user tamper with LocalStorage and send a request that gives them user permissions even if they shouldn't have them? With a JWT, because we sign it with our secret on the server side, when a user sends a token we can verify that it is valid and that we signed it, but I think by just sending a plain string you risk the user spoofing the permission and claiming to be a user.

Either way thank you for sharing your code, I'm using it to figure out how to integrate fastapi users in React and your code is very helpful. Cheers!

isAuthenticated = () => {
    const permissions = localStorage.getItem('permissions');
    if (!permissions) {
      return false;
    }
    return permissions === 'user' ? true : false;
  };

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.