fix login, extend backend log (#118)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user