fastapi-jwt-auth icon indicating copy to clipboard operation
fastapi-jwt-auth copied to clipboard

token_in_denylist_loader should support coroutines

Open ghulands opened this issue 4 years ago • 5 comments

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.

ghulands avatar Dec 20 '20 07:12 ghulands

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

IndominusByte avatar Dec 20 '20 11:12 IndominusByte

What is your timeline for the next version?

ghulands avatar Dec 20 '20 16:12 ghulands

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

IndominusByte avatar Dec 20 '20 16:12 IndominusByte

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 ?

mfrey777 avatar Jun 14 '21 19:06 mfrey777

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

sijokun avatar Feb 04 '22 00:02 sijokun