feat: Implement GitHub Authentication with Better Auth#8
feat: Implement GitHub Authentication with Better Auth#80xsupremedev wants to merge 2 commits intoboundlessfi:mainfrom
Conversation
- Add server-side auth configuration (lib/auth.ts) - Create API routes for OAuth flow (app/api/auth/[...all]/route.ts) - Wire GitHub sign-in button with OAuth handler - Add loading states and error handling - Include .env.example and setup documentation Resolves boundlessfi#1
|
Hi @Benjtalkshow @0xdevcollins, I've tested the implementation and found one syntax issue which I've already fixed and pushed. What was fixed:
Testing done:
Note: There are some pre-existing TypeScript errors in The GitHub OAuth integration is ready for review! Just need to add the OAuth credentials to test the full flow. Let me know if you'd like any adjustments or have questions about the implementation. Also happy to discuss compensation for working on issues #5, #6, and #7 if you're interested! |
|
Hello @0xsupremedev, This issue needs to be assigned to you before you can submit a PR. I just checked and you weren’t assigned to this issue, so the PR is currently invalid. To get assigned, please visit https://www.drips.network/wave/stellar/issues We’ll also be creating more issues in the coming days. |
Pull Request: Implement GitHub Authentication with Better Auth
Summary
Implements GitHub OAuth authentication using Better Auth as requested in issue #1.
Changes Made
Files Created:
lib/auth.ts- Server-side Better Auth configuration with GitHub providerapp/api/auth/[...all]/route.ts- Next.js API route handler for OAuth flowGITHUB_AUTH_README.md- Complete setup and testing documentation.env.example- Environment variables templateFiles Modified:
lib/auth-client.ts- Added exported sign-in methods for easier accesscomponents/login/sign-in.tsx- Wired GitHub button with OAuth handler, added loading statesImplementation Details
Setup Required
{YOUR_URL}/api/auth/callback/github.env.example):GITHUB_CLIENT_IDGITHUB_CLIENT_SECRETNEXT_PUBLIC_APP_URLAUTH_SECRETTesting
To test locally:
Navigate to
/authand click "Sign in with Github"Notes
About This Contribution
I've implemented this feature to demonstrate my capabilities and familiarity with your codebase. I'm also interested in working on issues #5, #6, and #7.
Happy to discuss compensation structure if you're interested in having me continue contributing to Boundless!
Resolves
Closes #1
Ready for review! Let me know if you'd like any adjustments.