pub async fn capture_redirect_code(
redirect_uri: String,
timeout: Duration,
) -> Result<Option<String>>Expand description
Bind localhost (HTTP or HTTPS) and wait for an OAuth redirect carrying code=.
Browsers often fail the first TLS handshake before the user accepts the self-signed certificate, so we keep accepting connections until timeout.