diff --git a/playgrounds/app/src/routes/api/oauth.ts b/playgrounds/app/src/routes/api/oauth.ts index 24cdb17..55d8646 100644 --- a/playgrounds/app/src/routes/api/oauth.ts +++ b/playgrounds/app/src/routes/api/oauth.ts @@ -35,6 +35,8 @@ export async function POST(event: APIEvent) { const githubUser = await githubUserResponse.json() + console.log({ ...githubUser }) + let user = await db.query.users.findFirst({ where: eq(usersTable.githubId, githubUser.id), }) diff --git a/playgrounds/app/src/routes/logged-out.tsx b/playgrounds/app/src/routes/logged-out.tsx index 1f71d2b..9a0cca4 100644 --- a/playgrounds/app/src/routes/logged-out.tsx +++ b/playgrounds/app/src/routes/logged-out.tsx @@ -17,7 +17,9 @@ export default function LoggedOut() { as="a" href={`https://github.com/login/oauth/authorize?client_id=${ import.meta.env.VITE_GITHUB_CLIENT_ID - }&redirect_uri=${window.location.origin}/oauth`} + }&scope=${encodeURIComponent('read:user,user:email')}&redirect_uri=${ + window.location.origin + }/oauth`} > Login