Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 1.17 KB

README.md

File metadata and controls

22 lines (16 loc) · 1.17 KB

RepoSense-auth-helper

Exchanges the code from GitHub together with the client_secret to obtain the oAuth access_token, as outlined in step 2 of the oAuth web application flow.

This helper is necessary as the client_secret cannot be exposed on any client-only application.

Deployed with Cloudflare Workers, eliminating the need for traditional server-based solutions like Gatekeeper.

Setting Up

Create a .dev.vars file in the root directory and insert the client_secret of the GitHub oAuth app like so:

CLIENT_SECRET=<YOUR_CLIENT_SECRET_HERE>

Refer to the Cloudflare guide to learn how to run the worker locally.

Publishing

Before publishing the worker, we need to define the environment secret by running the following command:

wrangler secret put CLIENT_SECRET

See the Cloudflare docs for more information.