Skip to content

itsjef/django-supertokens-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Supertokens Example

Start Supertokens

$ docker compose up

Create first user

Open Django shell: python manage.py shell and type:

from api.models import SupertokensUser                                     
from supertokens_python.recipe.emailpassword.syncio import sign_up         

username, password = 'test@example.com', '123456'                          
resp = sign_up(username, password)                 
u = SupertokensUser(id=resp.user.user_id, email=username)                  
u.save()                                          

Start Django Server

(to-be-updated)

Sign In

Using httpie

$ http POST :8000/api/auth/signin formFields:='[{"id":"email","value":"test@example.com"},{"id":"password","value":"123456"}]'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published