NicksMacLife / padlock-discord

Simple Cloudflare worker to lock redirects to a certain discord oauth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Padlock

Simple CloudFlare worker to lock redirects to a certain Microsoft oAuth domain.

Setting up

Requirements

These instructions assume you have basic familiarity with using Wrangler and have it installed and authenticated to a CloudFlare account.

Creating a Microsoft oAuth Application

  1. Access the Azure Portal and click "Microsoft Entra ID", in the overview section click "app registrations" and finally click "new registration"
  2. Fill out the application name, account type and add in a redirect URL
  3. On the next page take note of the Application (client) ID and the Directory (tenant) ID
  4. On the sidebar, click "Certificates & Secrets" and click "New client secret", create a client secret and take note of the value

Configure & Deploy

  1. Using the example, create the wrangler.toml
cp wrangler-example.toml wrangler.toml
  1. Using your editor of choice, fill out the enviornment variables
  2. Using wrangler, add the client secret
wrangler secret put clientSecret
  1. Using wrangler, deploy
wrangler deploy

About

Simple Cloudflare worker to lock redirects to a certain discord oauth

License:MIT License


Languages

Language:TypeScript 100.0%