git clone git@github.com:theusindabike/trombei-api.git
cd trombei-api
cp contrib/env-sample .env
make run
make tests
make lint
make run_staging
Available at: http://localhost/swagger/ and http://localhost/redoc/
- Access
https://accounts.google.com/o/oauth2/v2/auth?client_id=<<GOOGLE_OAUTH2_LOGIN_CLIENT_ID>>&response_type=code&scope=openid%20email%20profile&access_type=offline&redirect_uri=<<CALLBACK_URL>>
- Copy the returned Code in url param
- Make a POST to http://localhost/api/v1/oauth/google passing that Code, for example:
curl --data "code=4/0aaabbb7ZThsWhHh9zB93MiinOAaSFcKsPdwXdYy_NkpqC8xAOclp33F1_0zK4P9fU9Wzzzz" https://trombei.com/api/v1/oauth/google/
- Now you should have a Token
- Finnaly, you can access a protected endpoint with that token as Authorization Header, for example:
curl -H "Authorization: Token 123499d1c57d1d4e456c6009416b8a089cfa789" http://localhost/api/v1/users/me/
- docker-compose
- django
- postgres