From 54381471451c25dfe95c08c40bd52aad60792dc5 Mon Sep 17 00:00:00 2001 From: Stan Wohlwend Date: Sat, 20 Jul 2024 16:03:46 -0700 Subject: [PATCH] More stuff --- .../backend/endpoints/api/v1/auth/oauth/authorize.test.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/e2e/tests/backend/endpoints/api/v1/auth/oauth/authorize.test.ts b/apps/e2e/tests/backend/endpoints/api/v1/auth/oauth/authorize.test.ts index fbbcc704a..a0d8c238a 100644 --- a/apps/e2e/tests/backend/endpoints/api/v1/auth/oauth/authorize.test.ts +++ b/apps/e2e/tests/backend/endpoints/api/v1/auth/oauth/authorize.test.ts @@ -2,8 +2,6 @@ import { throwErr } from "@stackframe/stack-shared/dist/utils/errors"; import { it, localRedirectUrl } from "../../../../../../helpers"; import { backendContext, niceBackendFetch } from "../../../../../backend-helpers"; -// TODO: We need to mock STACK_GITHUB_CLIENT_ID and STACK_GITHUB_CLIENT_SECRET before we can run these tests, so they're currently marked as todo - function getAuthorizeQuery() { const projectKeys = backendContext.value.projectKeys; if (projectKeys === "no-project") throw new Error("No project keys found in the backend context"); @@ -22,7 +20,7 @@ function getAuthorizeQuery() { } it("should redirect the user to the OAuth provider with the right arguments", async ({ expect }) => { - const response = await niceBackendFetch("/api/v1/auth/oauth/authorize/github", { + const response = await niceBackendFetch("/api/v1/auth/oauth/authorize/facebook", { redirect: "manual", query: { ...getAuthorizeQuery(), @@ -34,7 +32,7 @@ it("should redirect the user to the OAuth provider with the right arguments", as }); it("should fail if an invalid client_id is provided", async ({ expect }) => { - const response = await niceBackendFetch("/api/v1/auth/oauth/authorize/github", { + const response = await niceBackendFetch("/api/v1/auth/oauth/authorize/facebook", { redirect: "manual", query: { ...getAuthorizeQuery(), @@ -58,7 +56,7 @@ it("should fail if an invalid client_id is provided", async ({ expect }) => { }); it("should fail if an invalid client_secret is provided", async ({ expect }) => { - const response = await niceBackendFetch("/api/v1/auth/oauth/authorize/github", { + const response = await niceBackendFetch("/api/v1/auth/oauth/authorize/facebook", { redirect: "manual", query: { ...getAuthorizeQuery(),