Loopback authorization-code relay (RFC 8252 §7.3)
const url = 'https://example.com/api/oauth/loopback-callback?state=example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/oauth/loopback-callback?state=example'Registered redirect target for CIMD clients whose metadata documents
list loopback callbacks. GoTrue validates redirect_uri by exact
string match, so at authorize time the proxy forwards this FIXED URL
upstream and stashes the client’s validated ephemeral-port loopback
target (single-use, 600 s TTL, keyed by state). GoTrue redirects the
browser here after consent; this endpoint consumes the stash exactly
once and 302s the untouched query string (code/state/iss or the
OAuth error triple) to the loopback target. Never redirects anywhere
except a loopback http URI validated against the client’s metadata
document at authorize time.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Opaque client state — the stash correlation key.
Authorization code issued by the authorization server.
RFC 9207 issuer identifier, forwarded verbatim.
OAuth error code, forwarded verbatim on the error path.
OAuth error description, forwarded verbatim.
Responses
Section titled “ Responses ”Redirect to the stashed loopback callback with the query string intact.
Headers
Section titled “Headers ”invalid_request — state is missing, or no stash entry exists
for it (unknown, expired, or already consumed). Deliberately
uniform so the endpoint is not a probe for live authorization
flows.