Skip to main content
Module

x/deno_kv_oauth/mod.ts>getRequiredEnv

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

Returns the environment variable with the given key after ensuring that it's been set in the current process.

This can be used when defining a custom OAuth configuration.

Examples

Example 1

import { getRequiredEnv } from "https://deno.land/x/deno_kv_oauth@$VERSION/src/providers/get_required_env.ts";

getRequiredEnv("HOME"); // Returns "/home/alice"

Parameters

key: string