mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 05:06:41 +02:00
✨ feat(auth): add resend verification email to all login pages
Add ability to resend verification email when login fails with "Email not verified" error. Implemented across all 14 apps using Mana Core Auth. Changes: - Add POST /api/v1/auth/resend-verification endpoint to mana-core-auth - Add resendVerificationEmail method to shared-auth client - Update LoginPage component with resend UI and translations - Add resendVerificationEmail to all app auth stores - Add translations for de, en, fr, es, it - Add PlantaLogo to shared-branding - Migrate planta login to shared LoginPage component
This commit is contained in:
parent
f911243bf0
commit
0c150df0f1
45 changed files with 691 additions and 110 deletions
|
|
@ -20,6 +20,7 @@ import { AcceptInvitationDto } from './dto/accept-invitation.dto';
|
|||
import { SetActiveOrganizationDto } from './dto/set-active-organization.dto';
|
||||
import { ForgotPasswordDto } from './dto/forgot-password.dto';
|
||||
import { ResetPasswordDto } from './dto/reset-password.dto';
|
||||
import { ResendVerificationDto } from './dto/resend-verification.dto';
|
||||
import { JwtAuthGuard } from '../common/guards/jwt-auth.guard';
|
||||
|
||||
/**
|
||||
|
|
@ -173,6 +174,21 @@ export class AuthController {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resend verification email
|
||||
*
|
||||
* Sends a new verification email to the user.
|
||||
* Always returns success to prevent email enumeration attacks.
|
||||
*/
|
||||
@Post('resend-verification')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
async resendVerification(@Body() resendVerificationDto: ResendVerificationDto) {
|
||||
return this.betterAuthService.resendVerificationEmail(
|
||||
resendVerificationDto.email,
|
||||
resendVerificationDto.sourceAppUrl
|
||||
);
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// B2B Registration
|
||||
// =========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue