Skip to content

Commit

Permalink
chore: try logging guthubUser
Browse files Browse the repository at this point in the history
  • Loading branch information
cmgriffing committed Nov 15, 2024
1 parent f389139 commit b9cf5f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions playgrounds/app/src/routes/api/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
})
Expand Down
4 changes: 3 additions & 1 deletion playgrounds/app/src/routes/logged-out.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`}
>
<OcMarkgithub2 size={24} class="mr-4" />
Login
Expand Down

0 comments on commit b9cf5f4

Please sign in to comment.