While working on a small atproto OAuth client I discovered a neat service worker pattern that I don't think I've ever seen someone write about. The page makes normal fetch requests, and the service worker adds the authorization header and handles token refreshes/dpop retries/etc under the hood. https://tangled.org/jakelazaroff.com/atsw
1 comments