Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/b3b/django-supabase-auth
https://github.com/b3b/django-supabase-auth
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/b3b/django-supabase-auth
- Owner: b3b
- License: mit
- Created: 2023-06-29T19:23:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-10T19:13:06.000Z (11 months ago)
- Last Synced: 2024-10-03T11:35:54.135Z (about 1 month ago)
- Language: Python
- Size: 66.4 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
==============================
Django Supabase authentication
==============================.. start-badges
.. image:: https://img.shields.io/badge/stability-wip-lightgrey.svg
:target: https://github.com/b3b/django-supabase-auth
:alt: Stability
.. image:: https://img.shields.io/pypi/v/django-supabase-auth.svg
:target: https://pypi.python.org/pypi/django-supabase-auth
:alt: Latest version on PyPi
.. end-badgesExperimental project aimed at exploring the integration of Supabase with Django.
Disclaimer
==========Please note that this repository is for experimental purposes only. It may contain incomplete or unstable code. Use it at your own risk.
Installation
============You can install the latest released package version from PyPI using::
pip install django-supabase-auth[database]
Usage
=====Django project settings.py
--------------------------Add `supa_auth` to INSTALLED_APPS::
INSTALLED_APPS = [
# ... ,
"rest_framework",
"supa_auth",
]Fill in your Supabase database settings.
Retrieve these values from the Supabase dashboard under Database Settings
https://supabase.com/dashboard/project/_/settings/database .
At a minimum, ensure "HOST" and "PASSWORD" are configured::
DATABASES = {
"default": {
"ENGINE": "supa_auth",
"HOST": "db.*.supabase.co",
"PASSWORD": "...",
"OPTIONS": {
"sslmode": "require",
},
},
}The `supa_auth` engine automatically populates "NAME" and "USER" to default values ("postgres")::
Database migrations
-------------------Apply migrations to initialize the database::
python manage.py migrate
Checking Setup
--------------You can verify the setup using the command-line database client::
python manage.py dbshell
postgres=> SELECT count(*) FROM users;