feat(ATL-75): Add Better Auth for email authentication#77
Open
bolty-from-atl-bitlab[bot] wants to merge 1 commit intomainfrom
Open
feat(ATL-75): Add Better Auth for email authentication#77bolty-from-atl-bitlab[bot] wants to merge 1 commit intomainfrom
bolty-from-atl-bitlab[bot] wants to merge 1 commit intomainfrom
Conversation
- Install better-auth package - Add auth.ts server configuration with Prisma adapter - Add auth-client.ts for React client - Add Better Auth API route handler - Add Session, Account, Verification models to Prisma schema - Extend User model with email, name, emailVerified, image fields - Create email login page (/auth/email) - Create signup page (/auth/signup) - Update auth landing page with email option - Add type prop to Button component for form submissions - Update .env.sample with Better Auth config Nostr authentication remains intact as an alternative option. Closes ATL-75
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
The preview deployment is failing because new environment variables need to be added to Vercel: These are required by Better Auth. Once added to Vercel project settings, the build should pass. (The existing env vars like |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds email-based authentication using Better Auth alongside existing Nostr authentication.
Changes
Server
src/lib/auth.ts- Better Auth configuration with Prisma adaptersrc/app/api/auth/[...all]/route.ts- API route handlerClient
src/lib/auth-client.ts- React client for Better Authsrc/app/auth/page.tsx- Updated auth landing with email optionsrc/app/auth/email/page.tsx- Email sign in pagesrc/app/auth/signup/page.tsx- Account creation pageDatabase
Session,Account,Verificationmodels for Better AuthUsermodel withemail,name,emailVerified,imagefieldsOther
typeprop for form submissions.env.samplewith Better Auth configSetup Required
After merging:
BETTER_AUTH_SECRETandBETTER_AUTH_URLto environmentnpx prisma migrate devto create new tablesNotes
Closes ATL-75