Skip to main content
Module

x/oauth2_client/mod.ts>AuthorizationCodeTokenOptions

Minimalistic OAuth 2.0 client for Deno.
Latest
interface AuthorizationCodeTokenOptions
import { type AuthorizationCodeTokenOptions } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";

Properties

optional
state: string

The state parameter expected to be returned by the authorization response.

Usually you'd store the state you sent with the authorization request in the user's session so you can pass it here. If it could be one of many states or you want to run some custom verification logic, use the stateValidator parameter instead.

optional
stateValidator: (state: string | null) => Promise<boolean> | boolean

The state validator used to verify that the received state is valid.

The option object's state value is ignored when a stateValidator is passed.

optional
codeVerifier: string

When using PKCE, the code verifier that you got by calling getAuthorizationUri

optional
requestOptions: RequestOptions

Request options used when making the access token request.