better-auth / better-auth

The most comprehensive authentication library for TypeScript
https://better-auth.com
MIT License
2.83k stars 101 forks source link

Demo / Docs on backend Python support #301

Open supnim opened 15 hours ago

supnim commented 15 hours ago

Is your feature request related to a problem? Please describe. I am currently transitioning my authentication system from Supabase to Better-Auth and am integrating it with a Django backend. I find it difficult to get started as there is limited documentation on how to set up Better-Auth with Python/Django, especially in terms of authentication logic and handling JWTs or bearer tokens. (I a new dev so forgive me)

Describe the solution you'd like It would be helpful to have documentation or a demo repository that clearly explains the setup process for a Python backend, specifically using Django or any other common Python frameworks. The documentation should cover the following:

Describe alternatives you've considered Currently, I am reviewing examples for Node.js setups and trying to adapt them for Python, but a dedicated guide for Python would greatly speed up the integration process.

Additional context I am using Django-Ninja for my API endpoints and PostgreSQL as my database. Any Python-based examples would be beneficial for developers working with similar stacks.

Bekacru commented 14 hours ago

Better Auth is a TypeScript-only library. If you're planning to use it in a TypeScript backend and connect a Python client to a separate auth server, you can use REST API with the JWT plugin. Currently, we don’t provide—and don’t plan to provide—clients for Python or other languages in the near future. But, we will have OpenAPI documentation in the future, which you can reference to build your own client or make queries using the REST API.