viseshagarwal / auth-plugin

Auth Plugin is a robust and flexible Python library designed to streamline the authentication process in web applications. It provides built-in support for JWT authentication, OAuth2 token management, and seamless database connectivity with MongoDB, PostgreSQL, and MySQL.
https://pypi.org/project/auth-plugin/
MIT License
1 stars 0 forks source link

using the underlying context manager #1

Open thetrotfreak opened 2 months ago

thetrotfreak commented 2 months ago

https://github.com/viseshagarwal/auth-plugin/blob/6acbfa0d855cd8fd5f8e66cfb0b6fd233de2d2da/auth_plugin/db_manager.py#L77

viseshagarwal commented 2 months ago

Hi @thetrotfreak,

Thank you for reporting the issue.

It looks like there’s a problem with how database connections are managed in the authentication flow. I’ll address this by implementing a context manager to ensure connections are properly closed and improving error handling.

I’ll update the repository with a fix soon. Meanwhile, you can manually manage connections as a temporary workaround. If you have any additional details, please share them.

Best regards, Visesh