You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really like your project. the architecture is elegant, and it is using the components I need for a production level deployment (langchain, and fastapi). your code is also clean and easy to understand, and your videos helped grok it too.
two questions for you:
I don't see where I can store and changed the basic auth capabilities on the fastapi server side. Atleast its not clear in the code or in the readme. can you clarify?
I am considering extending your fastapi service to support oauth2.0, as I will need that capability to push to production. however that does require some storage capabilities, like secrets, token, scopes. there are going to be two target platforms I'll need to support. These are Heroku and Snowflake containers. After researching, the most optimum place to store state for Heroku would be in its postgreSQL service and for snowflake would obviously be in its own database. Please let me know what you think on this oauth2.0 extension. would you be interested in me sending you a pull request, or shall I fork off your code and maintain all this on my side?
Hi Omer, glad you like the repo and thanks for your kind words!
Re: updating the current auth - the simple ENV-configured header secret is set up in verify_bearer(), which is a dependency on the router that all the key routes are attached to.
I don't know if I'd want to add Heroku or Snowflake containers specific implementations directly in the core service since it's intended to be relatively generic. If there's a way to add it as an example or something on the side I would be interested! Also if it could be set up in a generic way in the core service, I might be interested. Certainly if you post any public fork with this code please do share it back as I'm sure others will be interested.
Just a note maybe worth considering whether OAuth2 or OIDC is the best to use. In some of my recent projects I was looking more at OIDC as being a bit more modern (e.g. see discussion here)
Reacted by The Capable Manager, Karen Javadyan, morphpiece, Haris Jabbar and Federico Berto
FYI: I did implemented Azure Auth in my application, which is really durable. I used https://github.com/intility/fastapi-azure-auth library. And I added a few code in service.py to achieve this.
here is some sample code I added in service.py, maybe it is helpful for other people.
Activity
JoshuaC215 commentedon Nov 30, 2024
Hi Omer, glad you like the repo and thanks for your kind words!
Re: updating the current auth - the simple ENV-configured header secret is set up in verify_bearer(), which is a dependency on the router that all the key routes are attached to.
I don't know if I'd want to add Heroku or Snowflake containers specific implementations directly in the core service since it's intended to be relatively generic. If there's a way to add it as an example or something on the side I would be interested! Also if it could be set up in a generic way in the core service, I might be interested. Certainly if you post any public fork with this code please do share it back as I'm sure others will be interested.
Just a note maybe worth considering whether OAuth2 or OIDC is the best to use. In some of my recent projects I was looking more at OIDC as being a bit more modern (e.g. see discussion here)
xytian315 commentedon May 12, 2025
FYI: I did implemented Azure Auth in my application, which is really durable. I used https://github.com/intility/fastapi-azure-auth library. And I added a few code in
service.pyto achieve this.here is some sample code I added in service.py, maybe it is helpful for other people.