mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 03:26:42 +02:00
feat(auth): add email verification endpoint for Better Auth
Better Auth generates verification URLs with /api/auth/verify-email path, but NestJS uses /api/v1 prefix. This adds a passthrough controller to handle the native Better Auth routes and properly verify user emails. - Add BetterAuthPassthroughController for /api/auth/* routes - Add verifyEmail method to BetterAuthService - Exclude /api/auth/* from global prefix in main.ts - Register passthrough controller in AuthModule Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
def7249058
commit
ad4ae93f29
4 changed files with 103 additions and 3 deletions
|
|
@ -1,11 +1,12 @@
|
|||
import { Module, forwardRef } from '@nestjs/common';
|
||||
import { AuthController } from './auth.controller';
|
||||
import { BetterAuthPassthroughController } from './better-auth-passthrough.controller';
|
||||
import { BetterAuthService } from './services/better-auth.service';
|
||||
import { ReferralsModule } from '../referrals/referrals.module';
|
||||
|
||||
@Module({
|
||||
imports: [forwardRef(() => ReferralsModule)],
|
||||
controllers: [AuthController],
|
||||
controllers: [AuthController, BetterAuthPassthroughController],
|
||||
providers: [BetterAuthService],
|
||||
exports: [BetterAuthService],
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue