gitmyhub

login-with-cloudflare

TypeScript ★ 13 updated 11d ago

Demo and reference implementation for Cloudflare self-managed OAuth clients

Cloudflare is a web infrastructure company that offers services like DNS, firewalls, content delivery, and serverless computing. This repository is a working demo that shows how a third-party application can let users sign in with their Cloudflare account, in a way that does not require the user to generate and paste an API token.

The approach used here is called OAuth, a widely used standard for letting one service request limited access to another service on behalf of a user. Instead of copying credentials, the user clicks a login button, gets sent to Cloudflare to approve the request, chooses which of their Cloudflare accounts to share, and is then sent back to the app. The app receives a token that lets it call Cloudflare's own APIs on behalf of the user, but only within the specific permissions the user approved.

In this demo, those permissions are read-only. After login, the app uses the access it was granted to check which Cloudflare products the user's account appears to be using, then shows a brief summary. The access token is stored on the server side rather than in the user's browser, which is a standard security practice.

The app itself is built and deployed on Cloudflare Workers, which is Cloudflare's own serverless hosting platform. The README describes this as a reference implementation, meaning it is meant to be studied and adapted by developers who want to build their own apps that use Cloudflare's new self-managed OAuth client feature, announced in June 2026. The project is written in TypeScript and includes a live demo link.