diff --git a/apps/backend/src/users.js b/apps/backend/src/users.js index 25e5d403..12e87457 100644 --- a/apps/backend/src/users.js +++ b/apps/backend/src/users.js @@ -61,7 +61,10 @@ async function githubAuthenticate(code, privateAccess) { const accessToken = body && body.access_token ? body.access_token : null; if (!accessToken) { - throw new Error("OAuth Error: access_token missing from response"); + throw new Error( + "OAuth Error: access_token missing from response: " + + JSON.stringify(body), + ); } const userId = await getUserFromToken(accessToken); diff --git a/apps/frontend/src/pages/Home/Home.tsx b/apps/frontend/src/pages/Home/Home.tsx index f6fcc25b..b9fc1345 100644 --- a/apps/frontend/src/pages/Home/Home.tsx +++ b/apps/frontend/src/pages/Home/Home.tsx @@ -199,7 +199,7 @@ export function HomeScreen({ stage, setStage }: HomeScreenProps): JSX.Element { // If GitHub API returns the code parameter if (url.includes("code=")) { const tempPrivateAccess = url.includes("private"); - const newUrl = url.split("?code=", 2) as [string, string]; + const newUrl = url.split("code=", 2) as [string, string]; const redirect = `${url.split(HOST)[0] as string}${HOST}/frontend`; window.history.pushState({}, "", redirect); setIsLoading(true);