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
Provide a way to inject a custom aiohttp client session that can be reused in a web server.
Alternatives and current work-arounds
for name in modules.keys():
module = getattr(auth0_client, name)
module._async_client.client.set_session(SingletonAuth0AiohttpClientSession.get_aiohttp_client_session())
where the SingletonAuth0AiohttpClientSession is a class that is managed by FastAPI application events that automatically closes the session on the application shutdown.
Additional information, if any
The text was updated successfully, but these errors were encountered:
Describe the problem you'd like to have solved
We've refactored our implementation of auth0 python in order to leverage the new asyncio support.
During the development, we've found difficult to provide an aiohttp HTTP client session to the auth0 SDK, making difficult to leverage a best practice like https://docs.aiohttp.org/en/stable/faq.html#how-do-i-manage-a-clientsession-within-a-web-server
Describe the ideal solution
Provide a way to inject a custom aiohttp client session that can be reused in a web server.
Alternatives and current work-arounds
where the
SingletonAuth0AiohttpClientSession
is a class that is managed by FastAPI application events that automatically closes the session on the application shutdown.Additional information, if any
The text was updated successfully, but these errors were encountered: