To get started, follow the instructions on how to run the REST API
make keys
export $(grep -v ^# .env.example)
export PRIVATE_KEY=$(cat ./scripts/private_key.pem)
make migrations
make run
To get started, follow the instructions on how to run http handler test
make keys
export PRIVATE_KEY=$(cat ./scripts/private_key.pem)
go test ./... -v -client_id={client_id} -client_secret={client_secret} -redirect_url={redirect_url}
Note: You must register your project to get the environment variable needed to set up Google oauth. Google Cloud Platform
cookie storage server storege
|-------------| |----------| Request HTTP |----------| |-------------|
|code verifier| | | random state && code challenge && code | | | code |
| && | | |=======================================>| | | challenge |
| state | | | |Authoriza-| | |
|-------------| | | redirected back to |cion serv-| |-------------|
| | state && code |er |
| Client |<=======================================| |
|-------------| | | | Google | |-------------|
|client state | | | Exchange | Login | |code verifier|
| matches | | | code verifier && code | | | matches |
| redirect | | |=======================================>| | | code |
| state | | | | | | challenge |
|-------------| |----------| |----------| |-------------|