IndominusByte / fastapi-jwt-auth

FastAPI extension that provides JWT Auth support (secure, easy to use, and lightweight)
http://indominusbyte.github.io/fastapi-jwt-auth/
MIT License
630 stars 143 forks source link

token_in_denylist_loader should support coroutines #30

Open ghulands opened 3 years ago

ghulands commented 3 years ago

I'm using asyncio_redis for the revocation list of tokens and it would be nice if the library supported coroutines (async def functions) for the AuthJWT.token_in_denylist_loader callback.

IndominusByte commented 3 years ago

Good idea I was thinking about that too, I will add the feature in the next version 😄

ghulands commented 3 years ago

What is your timeline for the next version?

IndominusByte commented 3 years ago

After I tested fastapi-jwt-auth in my client project and finished my client project, maybe at the end of January or mid-February

mfrey777 commented 3 years ago

I ran into the same issue when trying to use asyncio_redis for the revocation list. What work-around did you use ? Did you create a new asyncio loop or did you create a second redis (sync) connection ?

sijokun commented 2 years ago

I ran into the same issue when trying to use asyncio_redis for the revocation list. What work-around did you use ? Did you create a new asyncio loop or did you create a second redis (sync) connection ?

I created an async fork of the library, I do not pretend to create a good async code, but it is to works with it in an async application.

https://github.com/sijokun/async-fastapi-jwt-auth