Skip to content

validateOAuth2Draft

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/web/src/app/app/projects/[id]/technical-docs/components/PlaygroundOAuth2Config.tsx

The same rules the API enforces, run while the owner is still looking at the field.

Duplicated on purpose. The server is the one that decides — a browser check protects nothing — but a rejection that arrives as a red banner after a save is a much worse way to learn that an authorization endpoint has to be https than a message under the input as it is typed.

Signature

ts
function validateOAuth2Draft(draft: OAuth2Draft): OAuth2DraftValidation

Parameters

NameType
draftOAuth2Draft

Returns: OAuth2DraftValidation

Was this page helpful?

Download as PDF