rayluo / identity

This is an authentication/authorization library optimized for web apps. It provides some higher level APIs built on top of Microsoft's MSAL Python. Read its documentation here: https://identity-library.readthedocs.io
https://identity-library.readthedocs.io
MIT License
48 stars 6 forks source link

Support for FastAPI framework #22

Open pamelafox opened 6 months ago

pamelafox commented 6 months ago

It's one of the top 3 popular Python web frameworks this day and is async only, so it's important for applications that make long network calls. Would love built-in support for it.

jdoiro3 commented 5 months ago

I'm using nicegui which is built with FastAPI and am close to getting it working but hit an issue with the session object since Starlette does not have a global session object like Flask. I tried to just pass a dict but that causes issues since that object is shared among all requests.

@rayluo, I wonder how hard it would be to implement a WebFrameworkAuth class for Starlette/FastAPI.

rayluo commented 5 months ago

how hard it would be

Not sure yet. Haven't started looking into FastAPI. But it is high priority in our feature TODO list, for the reasons that @pamelafox mentioned.

By the way, you can click the Watch button (which is near the Star button) from this repo's homepage to receive its future release notice.

git-hamza commented 2 months ago

Any update on this?

stevstrong commented 4 days ago

Hi, I would love to hear some good news here, I am also trying to adapt the session object for FastAPI. I would really appreciate any hints.