Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fathym_common/src/src.deps.ts>DenoKVOAuth.createAzureAdb2cOAuthConfig

The Fathym Reference Architecture provides the common foundation for applications built in Typescript.
Go to Latest
function DenoKVOAuth.createAzureAdb2cOAuthConfig
import { DenoKVOAuth } from "https://deno.land/x/fathym_common@v0.0.143/src/src.deps.ts";
const { createAzureAdb2cOAuthConfig } = DenoKVOAuth;

Returns the OAuth configuration for Azure.

Requires --allow-env[=AZURE_ADB2C_CLIENT_ID,AZURE_ADB2C_CLIENT_SECRET,AZURE_ADB2C_DOMAIN,AZURE_ADB2C_POLICY,AZURE_ADB2C_TENANT_ID] permissions and environment variables:

  1. AZURE_ADB2C_CLIENT_ID
  2. AZURE_ADB2C_CLIENT_SECRET
  3. AZURE_ADB2C_DOMAIN
  4. AZURE_ADB2C_POLICY
  5. AZURE_ADB2C_TENANT_ID

Examples

Example 1

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

const oauthConfig = createAzureAdb2cOAuthConfig({
  redirectUri: "http://localhost:8000/callback",
  scope: ["openid", Deno.env.get("AZURE_ADB2C_CLIENT_ID")!]
});

Parameters

config: { redirectUri?: string; scope: string | string[]; }

Returns

OAuth2ClientConfig