import { DenoKVOAuth } from "https://deno.land/x/fathym_eac_runtime@v0.0.140/src/src.deps.ts";
const { handleCallback } = DenoKVOAuth;
Handles the OAuth callback request for the given OAuth configuration, and
then redirects the client to the success URL set in signIn
. The
request URL must match the redirect URL of the OAuth application.
Examples
Example 1
Example 1
import { handleCallback, createGitHubOAuthConfig } from "https://deno.land/x/deno_kv_oauth@$VERSION/mod.ts";
const oauthConfig = createGitHubOAuthConfig();
export async function handleOAuthCallback(request: Request) {
const { response, tokens, sessionId } = await handleCallback(
request,
oauthConfig,
);
// Perform some actions with the `tokens` and `sessionId`.
return response;
}