FastAPI - JWT Authentication - Secure your Endpoints (Part1 for creating a chatbot with custom ux)

Поделиться
HTML-код
  • Опубликовано: 16 окт 2024

Комментарии • 24

  • @nikhilsharma26500
    @nikhilsharma26500 Год назад +4

    You're doing a phenomenal job! View count might be low now but the value it adds is incredible. Please keep making and sharing content like these I'm very thankful!

  • @wahi80
    @wahi80 5 месяцев назад

    Awesome video, do you have something similar which would use social auth like Google to authenticate and secure the FastAPI endpoints? It will save the pain of maintaining the DB for users

  • @sathishKumar-wb6sl
    @sathishKumar-wb6sl 4 месяца назад

    Thanks much for the great video and explanation. your video has greatly helped me to understand the concept of JWT. However, could you tell me the purpose and use of token post end point. Because without invoking the token endpoint, I'm able to authorize and call the conversation end point successfully.

    • @codingcrashcourses8533
      @codingcrashcourses8533  4 месяца назад

      Yes sure. The token endpoint is there to giving you the credentials, the token. This is what u send in every subsequent request in the request header :)

    • @sathishKumar-wb6sl
      @sathishKumar-wb6sl 4 месяца назад

      @@codingcrashcourses8533 thanks much for the Swift response. Just curious to know, what happens when we remove the token end point. Because when we authorise, it's just asking for username and password. Pardon me, if that is already explained. Thanks again.

    • @codingcrashcourses8533
      @codingcrashcourses8533  4 месяца назад

      @@sathishKumar-wb6sl then you wont get a token and won´t be able to access the endpoints which require authentication

    • @sathishKumar-wb6sl
      @sathishKumar-wb6sl 4 месяца назад

      @@codingcrashcourses8533 perfect, understood. Appreciate all your help. Definitely you're going to big and make others as well. My best wishes to you ❤️

  • @awakenwithoutcoffee
    @awakenwithoutcoffee 13 дней назад

    What about using Session-based auth. in favor of JWT ? I'm tasked to solve authorization/authentication and it's a real challenge so far. We have access to "Auth0" but session based examples for python (fast-api) are nowhere to be found.

    • @codingcrashcourses8533
      @codingcrashcourses8533  13 дней назад +1

      I don´t have much experience with session based auth, since you need server and client to archieve that. On modern apps, you typically scale horizontally, which makes session based auth very difficult.

  • @sanmesh327
    @sanmesh327 Год назад

    hey, thanks a lot! this video really help me to get understand.
    just let me know which packages/modules need to be install first.

    • @sanmesh327
      @sanmesh327 Год назад

      just let me know which libraries need to be installed, because this is my one of internship task, I need to complete today only 😄

    • @codingcrashcourses8533
      @codingcrashcourses8533  Год назад

      @@sanmesh327 Run pip install pipreqs and run "pipreqs .". This will create you a requirements.txt file from an existing project. For this project FastAPI should be enough in general.

    • @sanmesh327
      @sanmesh327 Год назад

      @@codingcrashcourses8533 okay,
      yes, I've installed general libraries.
      but getting "failed to build pyCrypto
      ERROR: Could not build wheels for pyCrypto, which is required to install pyproject.toml-based projects"
      this error

    • @sanmesh327
      @sanmesh327 Год назад

      @@codingcrashcourses8533 In my machine, pyCrypto is not working, so their is any alternative to pycrypto that I can use in project?

  • @avikhandakar
    @avikhandakar Год назад

    Hi, thanks for the tutorial. I have a problem. On latest version of FastApi use pydantic version 2 but langchain required pydantic 1. So i get an error. How can i solve it?

    • @codingcrashcourses8533
      @codingcrashcourses8533  Год назад

      Pydantic was just recently upgraded to 2.x . I currently suggest to downgrade it to version x.x until langchain updates it. Did not have time to take a view at the breaking changes of pydantic 2.x

  • @1977spaul
    @1977spaul 3 месяца назад

    route conversation is giving error "401 Unauthorised". How to debug the same.

  • @mauriciorondonfajardo4207
    @mauriciorondonfajardo4207 6 месяцев назад

    Hi Thank for content. however it doesn't work.