import { handleCallback } from "https://deno.land/x/fathym_everything_as_code@v0.0.399/src/deno.deps.ts";
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;
}