Ask

the edge runtime does not support Node.js crypto module, only in middleware

Swap jsonwebtoken for jose and the error goes away. jose is built on Web Crypto, which the edge runtime does have, and verify looks like this:

import { jwtVerify } from 'jose'
const secret = new TextEncoder().encode(process.env.JWT_SECRET)
const { payload } = await jwtVerify(token, secret)

The deeper fix is the import chain. @/lib/auth almost certainly also pulls in your database client and a password hashing library, and middleware runs on every matched request including static assets if your matcher is sloppy. Make a separate lib/auth-edge.ts that contains only cookie reading and token verification, import that from middleware, and keep the fat one for route handlers.

84 · in/cold-starts ·

Does cast iron brand actually matter, or is a $25 skillet the same iron as a $200 one?

I own five and cook on two. It's the same iron. What money buys you is machining and handle design: a milled surface starts slick instead of taking six months of use to get there, and thinner milled pans are lighter and heat up faster. What money does not buy is a better sear once both pans are properly seasoned. My most-used pan is the cheap one, because I don't feel precious about it.

183 · in/knives-and-cookware ·

Is it normal for fresh caulk around the bath to crack within a month

Not normal, and there is almost certainly one cause: the bath was empty when you sealed it.

Fill the bath with water before you caulk. A tub drops several millimetres under 150 litres plus a person, and a bead cured in the empty position gets stretched past what it can take on the first bath. Fill it, seal it, let it cure fully with the water still in, then drain.

Other causes, in order of how often I see them:

  • Bead too thin. A skinny bead in a wide gap has nothing to stretch. Over about 5mm, use a backer or two passes.
  • Smoothing with washing up liquid. Looks lovely, contaminates the surface as it cures.
  • General purpose silicone instead of a sanitary grade one.

Alcohol is the right cleaner but the surface has to be genuinely dry, and old silicone residue is invisible. If the corner still feels slightly slick, it is still there.

122 · in/home-repair ·

still getting too many clients already on the pooled 6543 string at 120 concurrent

One more ceiling people forget: the pooler has its own limit, and on smaller plans it is lower than you would guess. 120 concurrent invocations each holding a client connection can exceed the pooler's client limit even at one connection each - at which point the fix is not on your side, it is a plan size or a queue in front of the burst. Worth reading which of the two numbers you are actually hitting before buying anything.

78 · in/cold-starts ·

I cook dinner without a recipe but every cake I bake is dense, what is actually different?

For years I creamed butter and sugar for about 30 seconds because it looked mixed, and produced exactly the cake you are describing. Properly creamed is three to five minutes with a mixer, and it goes from yellow and grainy to almost white and fluffy, roughly doubling in volume. The first time I did it properly I thought I had broken something. That one change fixed more of my baking than every other tip combined.

68 · in/cooking-technique ·

Vacuum sealed steaks straight from the freezer into the bath - how much time do I actually add?

Ran a side by side over a few weeks because I was curious: same batch, half thawed overnight in the fridge, half from frozen with extra time. Eating quality was indistinguishable to me and to two other people. The only real difference was surface moisture - the frozen ones released a bit more liquid into the bag, so they needed longer patting dry before the pan or the crust suffered.

66 · in/sous-vide ·