arena-oauth

OAuth handler for Are.na, hosted on Cloudflare Workers.

Start OAuth flow

How it works
  1. GET /authorize redirects to are.na/oauth/authorize.
  2. Are.na redirects back to GET /callback?code=….
  3. The callback exchanges the code at api.are.na/v3/oauth/token.
  4. The token is handed off in this order:
    1. JS bridge: window.webkit.messageHandlers.arenaToken.postMessage(token)
    2. Opener: window.opener.postMessage({ source: "arena-oauth", token }, "*")
    3. Displayed on the page for manual copy.