fix login, extend backend log (#118)

This commit is contained in:
Martin
2026-03-04 21:33:31 +01:00
committed by GitHub
parent 19375f592f
commit 89cd8224ed
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -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);
+1 -1
View File
@@ -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);