Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/truggeri/oauth-debugger
Debug and test your OAuth2 code with this mock resource server
https://github.com/truggeri/oauth-debugger
gcp-cloud-functions go oauth2 svelte svelte3 watercss
Last synced: 22 days ago
JSON representation
Debug and test your OAuth2 code with this mock resource server
- Host: GitHub
- URL: https://github.com/truggeri/oauth-debugger
- Owner: truggeri
- License: mit
- Created: 2021-03-06T00:39:54.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-29T00:46:27.000Z (about 3 years ago)
- Last Synced: 2024-11-15T21:52:22.352Z (about 2 months ago)
- Topics: gcp-cloud-functions, go, oauth2, svelte, svelte3, watercss
- Language: Go
- Homepage: https://www.testoauth.com
- Size: 1.33 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# oauth-debugger
[![CI](https://github.com/truggeri/oauth-debugger/actions/workflows/ci.yml/badge.svg)](https://github.com/truggeri/oauth-debugger/actions/workflows/ci.yml)
![Go Badge](https://img.shields.io/badge/-Go-0084c0?style=flat&labelColor=00ADD8&logo=go&logoColor=white)
![Firestore Badge](https://img.shields.io/badge/-Firestore-e6c152?style=flat&labelColor=FFCA28&logo=firebase&logoColor=white)
![Svelte Badge](https://img.shields.io/badge/-Svelte-e65c2e?style=flat&labelColor=FF3E00&logo=svelte&logoColor=white)
![GCPF Badge](https://img.shields.io/badge/-GCP_Functions-6794db?style=flat&labelColor=4285F4&logo=google-cloud&logoColor=white)An app for debugging oauth code, a mock Service Api
## Documentation
See our [api documentation](https://testoauth.com/docs) for full details of each endpoint that's available.
## Build
This app can be built, and run, in many different ways.
### Docker
There is a Dockerfile with this project that can be used to run the application.
This Docker build will build the Go app, the Webpack front end, and finally runs the app.```bash
docker build -t oauthdebugger .
docker run --name oauthdebugger --rm -p 8090:8090 oauthdebugger:latest
```or
```bash
make docker-run
```### Just the UI
The UI is built, or dev served, by Webpack.
```bash
cd frontend/src/
npm install
npm run build # for production build
npm run dev # for dev build
npm run serve # for dev server
```### Just the Go Functions
There is a Go program that can host all the functions in one server for local development.
```bash
go build ./cmd/service/main.go
```## Deploy
The app is deployed in two pieces, the UI and Go functions.
### Docker Deploy
There is a Dockerfile made specifically for deploying the app to Google Cloud. This app consumes two environment variables for configuration, and mounts secrets in a volume.
```bash
docker build -t oad-deploy --file deploy.Dockerfile .
docker run -it --name dply --rm -e "GCP_PROJECT=xxx" -e "GCP_ACCOUNT=yyy" -v secrets:/secrets oad-deploy
```or
```bash
GCP_PROJECT=xxx GCP_ACCOUNT=yyy make deploy-run
```| ENV | Value |
| ------------- | ------------- |
| GCP_PROJECT | Project ID |
| GCP_ACCOUNT | Email of GCP Service Account used for deployment |### UI
The UI is hosted using GCP Firebase. To deploy it using the CLI,
```bash
firebase deploy --only hosting:outh-debugger
```or
```bash
make firebase-deploy
```### Go Functions
The Go functions are hosted as GCP cloud functions. These can be deployed via CLI in the following manner,
but note that you must manually copy other files and folders in. I would strongly advise using the Docker container
to deploy.```bash
cd functions
gcloud functions deploy client --allow-unauthenticated --region=us-central1 \
--runtime go113 --trigger-http --memory=128MB --entry-point=Client
```## Licensing
### Graphics
Graphics are provided by [Twemoji](https://twemoji.twitter.com/). Thank you for providing free SVG graphics.
```text
Copyright 2020 Twitter, Inc and other contributors
Code licensed under the MIT License: http://opensource.org/licenses/MIT
Graphics licensed under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/
```