Skip to content

Commit 7208cf2

Browse files
committed
chore(auth): complete cleanup and consistency hardening
1 parent 550bc79 commit 7208cf2

34 files changed

Lines changed: 13675 additions & 17922 deletions

development-guides/ROCKETS_AI_INDEX.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
> **For AI Tools**: This is your navigation hub for Rockets SDK development. Use this to quickly find the right guide for your task.
44
5+
## 🧭 Agent Instruction Files
6+
7+
- Canonical repository instructions: [`../AGENTS.md`](../AGENTS.md)
8+
- Compatibility alias: `../CLAUDE.md` (symlink to `../AGENTS.md`)
9+
- Shared collaboration notes: [`../.context/notes.md`](../.context/notes.md)
10+
- Shared task handoff list: [`../.context/todos.md`](../.context/todos.md)
11+
512
## 📋 **Quick Tasks**
613

714
### **🏗️ Phase 1: Project Foundation Setup**
@@ -143,4 +150,4 @@ Read AUTHENTICATION_ADVANCED_GUIDE.md and implement custom providers and strateg
143150

144151
---
145152

146-
**🚀 Start your journey: Pick a guide above and begin building with Rockets SDK!**
153+
**🚀 Start your journey: Pick a guide above and begin building with Rockets SDK!**

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"@concepta/nestjs-swagger-ui": "7.0.0-alpha.8",
4242
"@concepta/nestjs-typeorm-ext": "7.0.0-alpha.8",
4343
"@concepta/nestjs-user": "7.0.0-alpha.8",
44+
"@types/minimatch": "5.1.2",
4445
"lodash": "4.17.23"
4546
},
4647
"devDependencies": {

packages/rockets-server-auth/src/__fixtures__/services/auth-jwt.service.fixture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AuthJwtSettingsInterface } from '@concepta/nestjs-auth-jwt/dist/interfaces/auth-jwt-settings.interface';
1+
import { AuthJwtSettingsInterface } from '@concepta/nestjs-auth-jwt';
22
import { Injectable } from '@nestjs/common';
33

44
@Injectable()

packages/rockets-server-auth/src/__fixtures__/services/auth-refresh.service.fixture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AuthRefreshSettingsInterface } from '@concepta/nestjs-auth-refresh/dist/interfaces/auth-refresh-settings.interface';
1+
import { AuthRefreshSettingsInterface } from '@concepta/nestjs-auth-refresh';
22
import { Injectable } from '@nestjs/common';
33

44
@Injectable()

packages/rockets-server-auth/src/__fixtures__/services/validate-token.service.fixture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ValidateTokenServiceInterface } from '@concepta/nestjs-authentication/dist/interfaces/validate-token-service.interface';
1+
import { ValidateTokenServiceInterface } from '@concepta/nestjs-authentication';
22

33
export class ValidateTokenServiceFixture
44
implements ValidateTokenServiceInterface

packages/rockets-server-auth/src/domains/invitation/controllers/invitation-acceptance.controller.ts

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
import {
2-
Body,
3-
Controller,
4-
HttpCode,
5-
Param,
6-
Patch,
7-
Logger,
8-
} from '@nestjs/common';
1+
import { Body, Controller, HttpCode, Param, Patch } from '@nestjs/common';
92
import {
103
ApiTags,
114
ApiOperation,
@@ -34,8 +27,8 @@ export class InvitationAcceptanceController {
3427
* Accept an invitation
3528
*
3629
* Users accept invitations by providing the invitation code and OTP passcode.
37-
* The payload can contain any user data (firstName, lastName, password, metadata, etc.)
38-
* which will be processed by the InvitationUserAcceptanceListener.
30+
* The payload can contain `password` and `userMetadata`.
31+
* The listener ignores direct user field updates (email, username, active).
3932
*
4033
* @param code - The invitation code (UUID) from the email
4134
* @param dto - Acceptance data containing passcode and optional user data payload
@@ -61,19 +54,11 @@ export class InvitationAcceptanceController {
6154
@Body() dto: RocketsAuthInvitationAcceptDto,
6255
): Promise<void> {
6356
const { passcode, payload } = dto;
64-
65-
let success: boolean | null | undefined;
66-
67-
try {
68-
success = await this.invitationService.accept({
69-
code,
70-
passcode,
71-
payload,
72-
});
73-
} catch (e) {
74-
Logger.error(e);
75-
throw e;
76-
}
57+
const success = await this.invitationService.accept({
58+
code,
59+
passcode,
60+
payload,
61+
});
7762

7863
if (!success) {
7964
throw new RocketsAuthInvitationNotAcceptedException();

packages/rockets-server-auth/src/domains/invitation/controllers/invitation-reattempt.controller.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import {
44
ApiTags,
55
ApiOperation,
66
ApiParam,
7-
ApiOkResponse,
7+
ApiCreatedResponse,
88
} from '@nestjs/swagger';
9-
import { InvitationAttemptService } from '@concepta/nestjs-invitation/dist/services/invitation-attempt.service';
109
import { AdminGuard } from '../../../guards/admin.guard';
10+
import { InvitationAttemptService } from '../../../shared/compat/concepta-internals';
1111

1212
/**
1313
* Invitation Reattempt Controller
@@ -42,7 +42,7 @@ export class InvitationReattemptController {
4242
description: 'Invitation code',
4343
type: 'string',
4444
})
45-
@ApiOkResponse({
45+
@ApiCreatedResponse({
4646
description: 'Invitation email re-sent successfully',
4747
})
4848
async reattempt(@Param('code') code: string): Promise<void> {

packages/rockets-server-auth/src/domains/invitation/controllers/invitation-revocation.controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
ApiBearerAuth,
44
ApiTags,
55
ApiOperation,
6-
ApiOkResponse,
6+
ApiCreatedResponse,
77
} from '@nestjs/swagger';
88
import { InvitationService } from '@concepta/nestjs-invitation';
99
import { AdminGuard } from '../../../guards/admin.guard';
@@ -36,7 +36,7 @@ export class InvitationRevocationController {
3636
description:
3737
'Revoke all active invitations for a specific email and category',
3838
})
39-
@ApiOkResponse({
39+
@ApiCreatedResponse({
4040
description: 'Invitations revoked successfully',
4141
})
4242
async revoke(@Body() dto: RocketsAuthInvitationRevokeDto): Promise<void> {

packages/rockets-server-auth/src/domains/invitation/dto/rockets-auth-invitation-accept.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { InvitationAcceptInviteDto } from '@concepta/nestjs-invitation/dist/dto/invitation-accept-invite.dto';
1+
import { InvitationAcceptInviteDto } from '../../../shared/compat/concepta-internals';
22

33
/**
44
* Rockets Auth Invitation Accept DTO

packages/rockets-server-auth/src/domains/invitation/dto/rockets-auth-invitation-create.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { InvitationCreateInviteDto } from '@concepta/nestjs-invitation/dist/dto/invitation-create-invite.dto';
1+
import { InvitationCreateInviteDto } from '../../../shared/compat/concepta-internals';
22

33
/**
44
* Rockets Auth Invitation Create DTO

0 commit comments

Comments
 (0)