LoopbackReceiver
A one-shot HTTP listener on the loopback interface for an OAuth redirect (RFC 8252 §7.3). Bound to 127.0.0.1 only — never reachable from the network.
Open it before sending the user to the browser, then awaitCode.
Functions
Link copied to clipboard
Waits for the redirect and returns the authorization code after checking expectedState (CSRF). Answers the browser with a small page telling the user to return to the app. Requests to other paths (a favicon, a probe) are answered 404 and ignored.