5 Commits
Author SHA1 Message Date
MelvynFaith 4fe9ff1d7e feat: add GitHub OAuth2 login and protect product mutations with JWT
- add /auth/login and /auth/callback (rewritten to pages/api/auth/*) for the
  GitHub Authorization Code flow, with a state cookie against login CSRF
- issue a 1h JWT after the code exchange and verify it (HS256) in the Apollo
  context; createProduct, updateProduct and deleteProduct require it
- set products.created_by from the logged-in GitHub user (upsert into users)
- preset the Authorization header in the embedded Sandbox
- add jsonwebtoken, drop unused cors, rename package to week-7
2026-09-30 17:29:52 +07:00
MelvynFaith d9456638d7 feat: add product mutations, category filter, input validation, and DB constraints 2026-09-16 17:24:54 +07:00
MelvynFaith e86e5d3bbd Feat: Resolver 2026-09-16 16:51:36 +07:00
MelvynFaith 3b458298e0 feat: add embedded Apollo Sandbox page 2026-09-09 18:23:47 +07:00
MelvynFaith 6edf45b5f4 refactor: migrate to nextjs serverless handler for vercel 2026-09-09 17:12:18 +07:00