Skip to content

feat: add Google OAuth sign-in via better-auth#154

Open
amills-93 wants to merge 1 commit into
summer26from
feature/google-oauth-signin
Open

feat: add Google OAuth sign-in via better-auth#154
amills-93 wants to merge 1 commit into
summer26from
feature/google-oauth-signin

Conversation

@amills-93

Copy link
Copy Markdown
Collaborator

Summary

Adds Google OAuth sign-in on top of the existing email-OTP auth, targeting summer26.

  • Configure the Google social provider in better-auth (server/utils/auth.ts)
  • Map better-auth's image user field to the Volunteer.imageURL column
  • Add the better-auth catch-all route handler at server/api/auth/[...all].ts so OAuth callbacks are handled
  • Add a staff login page (app/pages/auth/staff-login.vue) and link to it from the main login page

Notes

  • Requires OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET env vars for the Google provider.
  • The existing custom OTP endpoints (login.post.ts, verify-otp.post.ts, etc.) are unchanged.

🤖 Generated with Claude Code

- Configure Google social provider in better-auth (auth.ts)
- Map better-auth `image` field to the Volunteer `imageURL` column
- Add better-auth catch-all handler at server/api/auth/[...all].ts
- Add staff login page and link it from the main login page

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants