Skip to content

Commit 26a1752

Browse files
committed
cleanup callback logs
1 parent c8b201b commit 26a1752

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

server/api/auth/github/callback.get.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { eq } from "drizzle-orm";
55
import { github, lucia } from "~/server/utils/auth";
66

77
export default eventHandler(async (event) => {
8-
console.log(" 🔥 hit the github callback url");
98
const query = getQuery(event);
109
const code = query.code?.toString() ?? null;
1110
const state = query.state?.toString() ?? null;
@@ -33,16 +32,11 @@ export default eventHandler(async (event) => {
3332
githubId: true,
3433
},
3534
});
36-
console.log(" 🔥 existingUser", { existingUser });
3735

3836
if (existingUser) {
3937
const session = await lucia.createSession(existingUser.id, {});
4038
const cookie = lucia.createSessionCookie(session.id);
4139
setCookie(event, cookie.name, cookie.value, cookie.attributes);
42-
console.log(
43-
" 🔥 redirecting to",
44-
`/o/${existingUser.username.toLocaleLowerCase()}`
45-
);
4640
return await sendRedirect(
4741
event,
4842
`/o/${existingUser.username.toLocaleLowerCase()}`
@@ -72,7 +66,6 @@ export default eventHandler(async (event) => {
7266
setCookie(event, cookie.name, cookie.value, cookie.attributes);
7367
return await sendRedirect(event, `/o/${githubUser.login.toLowerCase()}`);
7468
} catch (e) {
75-
console.error(" 🔥 error", e);
7669
if (
7770
e instanceof OAuth2RequestError &&
7871
e.message === "bad_verification_code"

0 commit comments

Comments
 (0)