Skip to content

toPublicOAuth2Scheme

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/api/src/project/playground-oauth2.ts

A scheme safe to publish, or null.

Every URL must be https: the spec is served to anonymous readers over the public internet, and a plain-http authorization endpoint would put an authorization code — and then a token — on the wire in clear. (The browser client makes the same check again; this one keeps the broken configuration out of the published document in the first place.)

Signature

ts
function toPublicOAuth2Scheme(config: PlaygroundOAuth2Config | null | undefined): { id: string; scheme: Record<string, unknown> } | null

Parameters

NameType
config`PlaygroundOAuth2Config

Returns: { id: string; scheme: Record<string, unknown> } | null

Was this page helpful?

Download as PDF