Skip to main content
Module

x/deno_kv_oauth/mod.ts>createOktaOAuth2Client

High-level OAuth 2.0 powered by Deno KV.
Go to Latest
function createOktaOAuth2Client
import { createOktaOAuth2Client } from "https://deno.land/x/deno_kv_oauth@v0.2.7/mod.ts";

Creates an OAuth 2.0 client with Okta as the provider.

Requires --allow-env[=OKTA_CLIENT_ID,OKTA_CLIENT_SECRET,OKTA_DOMAIN] permissions and environment variables:

  1. OKTA_CLIENT_ID
  2. OKTA_CLIENT_SECRET
  3. OKTA_DOMAIN

Examples

Example 1

import { createOktaOAuth2Client } from "https://deno.land/x/deno_kv_oauth@$VERSION/mod.ts";

const oauth2Client = createOktaOAuth2Client({
 redirectUri: "http://localhost:8000/callback",
 defaults: {
   scope: "openid"
 }
});

Parameters

additionalOAuth2ClientConfig: Partial<OAuth2ClientConfig> & WithRedirectUri & WithScope

Requires redirectUri and defaults.scope properties.