cloudflare/workers-oauth-provider
official
Official library to run an OAuth 2.1 provider on Workers, storing tokens in KV.
Token issue and refresh are KV writes. On Free that is 1,000 a day, so a busy login flow needs Paid.
Products: Workers and KV.
Open a worked model of this shape in the calculator