Experimental browser for the Atmosphere
Loading post...
{ "uri": "at://did:plc:cbkjy5n7bk3ax2wplmtjofq2/app.bsky.feed.like/3loo4ryvkfk2b", "cid": "bafyreiaum7vdbsic7qcci6xkwowyvesyd3sxuipnct3irw4lgag4nfbwee", "value": { "$type": "app.bsky.feed.like", "subject": { "cid": "bafyreicb6jui6n6gofa6xtikxcztuwrgnbsudkrx4va5y4v5ukjem2r6zu", "uri": "at://did:plc:2xau7wbgdq4phuou2ypwuen7/app.bsky.feed.post/3loo3hf27ic2q" }, "createdAt": "2025-05-08T14:30:10.973Z" } }
So we have code inside Next.js middleware that checks if the atproto access token is about to expire and refresh it if so. This code was hitting the database to check the token expiry on every request inside Next.js middleware, bad for perf as it has to complete before we can render any components
May 8, 2025, 2:06 PM