This is a simple auth server written in Go. It uses a Postgres database to store user information and JWT tokens for authentication.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
-
/
- Home @returnsauth-server-go
-
/health
- Get Health @returnsOK
-
/auth/google
- Google OAuth2 route, starts auth flow @returns{token, account}
-
/logout
- Logout @redirects to/
-
/account
- Get current user account from DB @returnsAccount{}
-
/secure/account/{id}
- Get account from DB using accountId @returnsAccount{}
build the application
make build
run the application
make run
Create DB container
make docker-run
Shutdown DB container
make docker-down
live reload the application
make watch
run the test suite
make test
clean up binary from the last build
make clean