Skip to main content
Module

x/oauth2_client/mod.ts>Tokens

Minimalistic OAuth 2.0 client for Deno.
Go to Latest
interface Tokens
import { type Tokens } from "https://deno.land/x/oauth2_client@v0.2.1/mod.ts";

Tokens and associated information received from a successful access token request.

Properties

accessToken: string
tokenType: string

The type of access token received.

See https://tools.ietf.org/html/rfc6749#section-7.1 Should usually be "Bearer" for most OAuth 2.0 servers, but don't count on it.

optional
expiresIn: number

The lifetime in seconds of the access token.

optional
refreshToken: string

The optional refresh token returned by the authorization server.

Consult your OAuth 2.0 Provider's documentation to see under which circumstances you'll receive one.

optional
scope: string[]

The scopes that were granted by the user.

May be undefined if the granted scopes match the requested scopes. See https://tools.ietf.org/html/rfc6749#section-5.1