Simple CloudFlare worker to lock redirects to a certain Microsoft oAuth domain.
These instructions assume you have basic familiarity with using Wrangler and have it installed and authenticated to a CloudFlare account.
- Access the Azure Portal and click "Microsoft Entra ID", in the overview section click "app registrations" and finally click "new registration"
- Fill out the application name, account type and add in a redirect URL
- On the next page take note of the
Application (client) ID
and theDirectory (tenant) ID
- On the sidebar, click "Certificates & Secrets" and click "New client secret", create a client secret and take note of the
value
- Using the example, create the wrangler.toml
cp wrangler-example.toml wrangler.toml
- Using your editor of choice, fill out the enviornment variables
- Using wrangler, add the client secret
wrangler secret put clientSecret
- Using wrangler, deploy
wrangler deploy