feat: trying to add hashes to scripts
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
import { oauth2Client } from "@lib/auth.ts";
|
||||
import { setCookie } from "@std/http/cookie";
|
||||
import { define } from "../../../utils.ts";
|
||||
|
||||
export const codeChallengeMap = new Map<
|
||||
string,
|
||||
{ codeVerifier: string; redirect?: string }
|
||||
>();
|
||||
|
||||
export const handler: Handlers = {
|
||||
async GET(req) {
|
||||
export const handler = define.handlers({
|
||||
async GET(ctx) {
|
||||
const req = ctx.req;
|
||||
const url = new URL(req.url);
|
||||
|
||||
const { codeVerifier, uri } = await oauth2Client.code.getAuthorizationUri();
|
||||
@@ -33,4 +34,4 @@ export const handler: Handlers = {
|
||||
status: 302,
|
||||
});
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user