- Clone or download repository
- Create a virtual environment and activate it -- You can use various virtual environments, like virtualenvwrapper, anaconda etc.
- Install requirements
> pip install -r requirements.txt
- run migrations
> python manage.py migrate
- create superuser
> python manage.py createsuperuser
- run
> python manage.py runserver
- add 'auth_api' to INSTALLED_APPS in settings.py
- add AUTH_USER_MODEL = 'auth_api.CustomUser' to settings.py
- add url(r'^api/$', include(auth_api.urls)) to urlpatterns in urls.py
- add EMAIL_BACKEND and EMAIL_FROM to settings.py
/api/login/ (POST)
requires: email, password returns: Authorisation Token
/api/logout/ (POST)
deletes Authorisation token, returns: success message
api/userdetails/ (GET)
requires: (Auth) returns: user details
api/userdetails/ (PUT)
requires: (Auth); email or first_name or last_name returns: user details
api/reset/ (POST)
requires: email creates password reset token sends e-mail to user returns: success/error
api/password/ (POST)
requires: (Auth); new password OR requires: email, password reset code, new password Sets new password, removes code returns: success/error
api/invite/ (POST)
requires: (Auth); team name, recipient email Creates or retrieves an invitation link from user to team Sends an email with code returns: invitationLink parameters
api/register/ (POST)
requires: email, password (first name, last name, invitation code) Creates a new user with provided information returns: created user details
api/create_team/ (POST)
requires: (Auth); team name Creates a new team using provided name, adds team to user teams returns: success/error
api/verify_email/ (POST)
requires: verification code Verifies user email, deletes verification token record returns: success/error
api/retrieve_code/ (POST)
requires: (Auth) returns: email verification code, password reset code
https://users-teams-example-app.herokuapp.com email: [email protected] password: QWer!@34
- Tests
- Remove invitation link from user, team when user leaves team