auth-phyton
Boilerplate/Starter Project for building RESTful APIs using Flask, SQLite, JWT authentication.
Setup
Step #1 - Install dependencies
$ pip install -r requirements.txt
Step #2 - setup flask
command for our app
$ export FLASK_APP=run.py
$ export FLASK_ENV=development
Step #3 - start test APIs server at localhost:5000
$ flask run
API
Register
POST /api/auth/register
{username:'yourname' ,email: '[email protected]',nik:'yournik', password: 'yourpasswod'}
Sign-In
POST /api/auth/login
{email: '[email protected]', password: 'yourpasswod'}
Logout
POST /api/auth/logout