@carlonicora/nestjs-neo4jsonapi 6.2.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/foundations/auth/controllers/auth.discord.controller.d.ts +1 -1
- package/dist/foundations/auth/controllers/auth.discord.controller.d.ts.map +1 -1
- package/dist/foundations/auth/controllers/auth.discord.controller.js +6 -3
- package/dist/foundations/auth/controllers/auth.discord.controller.js.map +1 -1
- package/dist/foundations/auth/controllers/auth.google.controller.d.ts +1 -1
- package/dist/foundations/auth/controllers/auth.google.controller.d.ts.map +1 -1
- package/dist/foundations/auth/controllers/auth.google.controller.js +6 -3
- package/dist/foundations/auth/controllers/auth.google.controller.js.map +1 -1
- package/dist/foundations/auth/dtos/auth.post.register.dto.d.ts +6 -0
- package/dist/foundations/auth/dtos/auth.post.register.dto.d.ts.map +1 -1
- package/dist/foundations/auth/dtos/auth.post.register.dto.js +36 -0
- package/dist/foundations/auth/dtos/auth.post.register.dto.js.map +1 -1
- package/dist/foundations/auth/services/auth.discord.service.d.ts +6 -2
- package/dist/foundations/auth/services/auth.discord.service.d.ts.map +1 -1
- package/dist/foundations/auth/services/auth.discord.service.js +29 -5
- package/dist/foundations/auth/services/auth.discord.service.js.map +1 -1
- package/dist/foundations/auth/services/auth.google.service.d.ts +6 -2
- package/dist/foundations/auth/services/auth.google.service.d.ts.map +1 -1
- package/dist/foundations/auth/services/auth.google.service.js +29 -5
- package/dist/foundations/auth/services/auth.google.service.js.map +1 -1
- package/dist/foundations/auth/services/auth.service.d.ts +12 -0
- package/dist/foundations/auth/services/auth.service.d.ts.map +1 -1
- package/dist/foundations/auth/services/auth.service.js +47 -8
- package/dist/foundations/auth/services/auth.service.js.map +1 -1
- package/dist/foundations/auth/services/pending-registration.service.d.ts +2 -0
- package/dist/foundations/auth/services/pending-registration.service.d.ts.map +1 -1
- package/dist/foundations/auth/services/pending-registration.service.js.map +1 -1
- package/dist/foundations/user/entities/user.d.ts +6 -0
- package/dist/foundations/user/entities/user.d.ts.map +1 -1
- package/dist/foundations/user/entities/user.js +7 -0
- package/dist/foundations/user/entities/user.js.map +1 -1
- package/dist/foundations/user/repositories/user.repository.d.ts +9 -0
- package/dist/foundations/user/repositories/user.repository.d.ts.map +1 -1
- package/dist/foundations/user/repositories/user.repository.js +23 -0
- package/dist/foundations/user/repositories/user.repository.js.map +1 -1
- package/dist/foundations/waitlist/dtos/waitlist.post.dto.d.ts +6 -0
- package/dist/foundations/waitlist/dtos/waitlist.post.dto.d.ts.map +1 -1
- package/dist/foundations/waitlist/dtos/waitlist.post.dto.js +36 -0
- package/dist/foundations/waitlist/dtos/waitlist.post.dto.js.map +1 -1
- package/dist/foundations/waitlist/entities/waitlist.d.ts +6 -0
- package/dist/foundations/waitlist/entities/waitlist.d.ts.map +1 -1
- package/dist/foundations/waitlist/entities/waitlist.js +6 -0
- package/dist/foundations/waitlist/entities/waitlist.js.map +1 -1
- package/dist/foundations/waitlist/index.d.ts +2 -0
- package/dist/foundations/waitlist/index.d.ts.map +1 -1
- package/dist/foundations/waitlist/index.js +8 -1
- package/dist/foundations/waitlist/index.js.map +1 -1
- package/dist/foundations/waitlist/services/waitlist.service.d.ts +2 -1
- package/dist/foundations/waitlist/services/waitlist.service.d.ts.map +1 -1
- package/dist/foundations/waitlist/services/waitlist.service.js +6 -4
- package/dist/foundations/waitlist/services/waitlist.service.js.map +1 -1
- package/dist/foundations/waitlist/utils/signup-source.d.ts +24 -0
- package/dist/foundations/waitlist/utils/signup-source.d.ts.map +1 -0
- package/dist/foundations/waitlist/utils/signup-source.js +52 -0
- package/dist/foundations/waitlist/utils/signup-source.js.map +1 -0
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ export declare class AuthDiscordController {
|
|
|
7
7
|
private readonly configService;
|
|
8
8
|
constructor(authDiscordService: AuthDiscordService, configService: ConfigService<BaseConfigInterface>);
|
|
9
9
|
private get discordConfig();
|
|
10
|
-
loginWithDiscord(reply: FastifyReply, inviteCode?: string, referralCode?: string): Promise<void>;
|
|
10
|
+
loginWithDiscord(reply: FastifyReply, inviteCode?: string, referralCode?: string, source?: string): Promise<void>;
|
|
11
11
|
callbackDiscord(reply: FastifyReply, code: string, state?: string): Promise<void>;
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=auth.discord.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.discord.controller.d.ts","sourceRoot":"","sources":["../../../../src/foundations/auth/controllers/auth.discord.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAKvC,OAAO,EAAE,mBAAmB,EAA0B,MAAM,4BAA4B,CAAC;AAEzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,qBACa,qBAAqB;IAE9B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADb,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAGpE,OAAO,KAAK,aAAa,GAExB;IAGK,gBAAgB,CACb,KAAK,EAAE,YAAY,EACT,UAAU,CAAC,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"auth.discord.controller.d.ts","sourceRoot":"","sources":["../../../../src/foundations/auth/controllers/auth.discord.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAKvC,OAAO,EAAE,mBAAmB,EAA0B,MAAM,4BAA4B,CAAC;AAEzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,qBACa,qBAAqB;IAE9B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADb,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAGpE,OAAO,KAAK,aAAa,GAExB;IAGK,gBAAgB,CACb,KAAK,EAAE,YAAY,EACT,UAAU,CAAC,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,EACvB,MAAM,CAAC,EAAE,MAAM;IAS5B,eAAe,CAAQ,KAAK,EAAE,YAAY,EAAiB,IAAI,EAAE,MAAM,EAAkB,KAAK,CAAC,EAAE,MAAM;CAmB9G"}
|
|
@@ -28,22 +28,24 @@ let AuthDiscordController = class AuthDiscordController {
|
|
|
28
28
|
get discordConfig() {
|
|
29
29
|
return this.configService.get("discord");
|
|
30
30
|
}
|
|
31
|
-
async loginWithDiscord(reply, inviteCode, referralCode) {
|
|
31
|
+
async loginWithDiscord(reply, inviteCode, referralCode, source) {
|
|
32
32
|
if (!this.discordConfig.clientId || !this.discordConfig.clientSecret)
|
|
33
33
|
throw new common_1.HttpException("Login with Discord is not available", common_1.HttpStatus.NOT_IMPLEMENTED);
|
|
34
|
-
reply.redirect(this.authDiscordService.generateLoginUrl(inviteCode, referralCode), 302);
|
|
34
|
+
reply.redirect(this.authDiscordService.generateLoginUrl(inviteCode, referralCode, source), 302);
|
|
35
35
|
}
|
|
36
36
|
async callbackDiscord(reply, code, state) {
|
|
37
37
|
// Parse invite code and referral code from state if present
|
|
38
38
|
const stateData = state ? this.authDiscordService.parseStateData(state) : undefined;
|
|
39
39
|
const inviteCode = stateData?.invite;
|
|
40
40
|
const referralCode = stateData?.referral;
|
|
41
|
+
const source = stateData?.source;
|
|
41
42
|
const accessToken = await this.authDiscordService.exchangeCodeForToken(code);
|
|
42
43
|
const userDetails = await this.authDiscordService.fetchUserDetails(accessToken);
|
|
43
44
|
const redirectUrl = await this.authDiscordService.handleDiscordLogin({
|
|
44
45
|
userDetails: userDetails,
|
|
45
46
|
inviteCode,
|
|
46
47
|
referralCode,
|
|
48
|
+
source,
|
|
47
49
|
});
|
|
48
50
|
reply.redirect(redirectUrl, 302);
|
|
49
51
|
}
|
|
@@ -54,8 +56,9 @@ __decorate([
|
|
|
54
56
|
__param(0, (0, common_1.Res)()),
|
|
55
57
|
__param(1, (0, common_1.Query)("invite")),
|
|
56
58
|
__param(2, (0, common_1.Query)("referral")),
|
|
59
|
+
__param(3, (0, common_1.Query)("source")),
|
|
57
60
|
__metadata("design:type", Function),
|
|
58
|
-
__metadata("design:paramtypes", [Object, String, String]),
|
|
61
|
+
__metadata("design:paramtypes", [Object, String, String, String]),
|
|
59
62
|
__metadata("design:returntype", Promise)
|
|
60
63
|
], AuthDiscordController.prototype, "loginWithDiscord", null);
|
|
61
64
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.discord.controller.js","sourceRoot":"","sources":["../../../../src/foundations/auth/controllers/auth.discord.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwF;AACxF,2CAA+C;AAE/C,sEAAsE;AACtE,8EAA8E;AAC9E,0CAA0C;AAC1C,qDAAiD;AAGjD,2EAAsE;AAG/D,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YACmB,kBAAsC,EACtC,aAAiD;QADjD,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,kBAAa,GAAb,aAAa,CAAoC;IACjE,CAAC;IAEJ,IAAY,aAAa;QACvB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAyB,SAAS,CAAC,CAAC;IACnE,CAAC;IAGK,AAAN,KAAK,CAAC,gBAAgB,CACb,KAAmB,EACT,UAAmB,EACjB,YAAqB;
|
|
1
|
+
{"version":3,"file":"auth.discord.controller.js","sourceRoot":"","sources":["../../../../src/foundations/auth/controllers/auth.discord.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwF;AACxF,2CAA+C;AAE/C,sEAAsE;AACtE,8EAA8E;AAC9E,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AAC;QAEhF,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC;YACnE,WAAW,EAAE,WAA0B;YACvC,UAAU;YACV,YAAY;YACZ,MAAM;SACP,CAAC,CAAC;QAEH,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACnC,CAAC;CACF,CAAA;AA3CY,sDAAqB;AAW1B;IADL,IAAA,YAAG,EAAC,GAAG,oBAAQ,CAAC,QAAQ,UAAU,CAAC;IAEjC,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;IACf,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;IACjB,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;;;;6DAMjB;AAGK;IADL,IAAA,YAAG,EAAC,GAAG,oBAAQ,CAAC,QAAQ,mBAAmB,CAAC;IACtB,WAAA,IAAA,YAAG,GAAE,CAAA;IAAuB,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IAAgB,WAAA,IAAA,cAAK,EAAC,OAAO,CAAC,CAAA;;;;4DAkB7F;gCA1CU,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAG4B,yCAAkB;QACvB,sBAAa;GAHpC,qBAAqB,CA2CjC"}
|
|
@@ -7,7 +7,7 @@ export declare class AuthGoogleController {
|
|
|
7
7
|
private readonly configService;
|
|
8
8
|
constructor(authGoogleService: AuthGoogleService, configService: ConfigService<BaseConfigInterface>);
|
|
9
9
|
private get googleConfig();
|
|
10
|
-
loginWithGoogle(reply: FastifyReply, inviteCode?: string, referralCode?: string): Promise<void>;
|
|
10
|
+
loginWithGoogle(reply: FastifyReply, inviteCode?: string, referralCode?: string, source?: string): Promise<void>;
|
|
11
11
|
callbackGoogle(reply: FastifyReply, code: string, state: string): Promise<void>;
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=auth.google.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.google.controller.d.ts","sourceRoot":"","sources":["../../../../src/foundations/auth/controllers/auth.google.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,OAAO,EAAE,mBAAmB,EAAyB,MAAM,4BAA4B,CAAC;AAExF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,qBACa,oBAAoB;IAE7B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADb,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAGpE,OAAO,KAAK,YAAY,GAEvB;IAGK,eAAe,CACZ,KAAK,EAAE,YAAY,EACT,UAAU,CAAC,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"auth.google.controller.d.ts","sourceRoot":"","sources":["../../../../src/foundations/auth/controllers/auth.google.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,OAAO,EAAE,mBAAmB,EAAyB,MAAM,4BAA4B,CAAC;AAExF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,qBACa,oBAAoB;IAE7B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADb,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAGpE,OAAO,KAAK,YAAY,GAEvB;IAGK,eAAe,CACZ,KAAK,EAAE,YAAY,EACT,UAAU,CAAC,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,EACvB,MAAM,CAAC,EAAE,MAAM;IAS5B,cAAc,CAAQ,KAAK,EAAE,YAAY,EAAiB,IAAI,EAAE,MAAM,EAAkB,KAAK,EAAE,MAAM;CAmB5G"}
|
|
@@ -29,22 +29,24 @@ let AuthGoogleController = class AuthGoogleController {
|
|
|
29
29
|
get googleConfig() {
|
|
30
30
|
return this.configService.get("google");
|
|
31
31
|
}
|
|
32
|
-
async loginWithGoogle(reply, inviteCode, referralCode) {
|
|
32
|
+
async loginWithGoogle(reply, inviteCode, referralCode, source) {
|
|
33
33
|
if (!this.googleConfig.clientId || !this.googleConfig.clientSecret)
|
|
34
34
|
throw new common_1.HttpException("Login with Google is not available", common_1.HttpStatus.NOT_IMPLEMENTED);
|
|
35
|
-
reply.redirect(this.authGoogleService.generateLoginUrl(inviteCode, referralCode), 302);
|
|
35
|
+
reply.redirect(this.authGoogleService.generateLoginUrl(inviteCode, referralCode, source), 302);
|
|
36
36
|
}
|
|
37
37
|
async callbackGoogle(reply, code, state) {
|
|
38
38
|
// Parse invite code and referral code from state if present
|
|
39
39
|
const stateData = this.authGoogleService.parseStateData(state);
|
|
40
40
|
const inviteCode = stateData?.invite;
|
|
41
41
|
const referralCode = stateData?.referral;
|
|
42
|
+
const source = stateData?.source;
|
|
42
43
|
const accessToken = await this.authGoogleService.exchangeCodeForToken(code);
|
|
43
44
|
const userDetails = await this.authGoogleService.fetchUserDetails(accessToken);
|
|
44
45
|
const redirectUrl = await this.authGoogleService.handleGoogleLogin({
|
|
45
46
|
userDetails: userDetails,
|
|
46
47
|
inviteCode,
|
|
47
48
|
referralCode,
|
|
49
|
+
source,
|
|
48
50
|
});
|
|
49
51
|
reply.redirect(redirectUrl, 302);
|
|
50
52
|
}
|
|
@@ -55,8 +57,9 @@ __decorate([
|
|
|
55
57
|
__param(0, (0, common_1.Res)()),
|
|
56
58
|
__param(1, (0, common_1.Query)("invite")),
|
|
57
59
|
__param(2, (0, common_1.Query)("referral")),
|
|
60
|
+
__param(3, (0, common_1.Query)("source")),
|
|
58
61
|
__metadata("design:type", Function),
|
|
59
|
-
__metadata("design:paramtypes", [Object, String, String]),
|
|
62
|
+
__metadata("design:paramtypes", [Object, String, String, String]),
|
|
60
63
|
__metadata("design:returntype", Promise)
|
|
61
64
|
], AuthGoogleController.prototype, "loginWithGoogle", null);
|
|
62
65
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.google.controller.js","sourceRoot":"","sources":["../../../../src/foundations/auth/controllers/auth.google.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwF;AACxF,2CAA+C;AAE/C,uEAAuE;AACvE,oEAAoE;AACpE,0EAA0E;AAC1E,+EAA+E;AAC/E,qDAAiD;AAGjD,yEAAoE;AAG7D,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,iBAAoC,EACpC,aAAiD;QADjD,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,kBAAa,GAAb,aAAa,CAAoC;IACjE,CAAC;IAEJ,IAAY,YAAY;QACtB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAwB,QAAQ,CAAC,CAAC;IACjE,CAAC;IAGK,AAAN,KAAK,CAAC,eAAe,CACZ,KAAmB,EACT,UAAmB,EACjB,YAAqB;
|
|
1
|
+
{"version":3,"file":"auth.google.controller.js","sourceRoot":"","sources":["../../../../src/foundations/auth/controllers/auth.google.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwF;AACxF,2CAA+C;AAE/C,uEAAuE;AACvE,oEAAoE;AACpE,0EAA0E;AAC1E,+EAA+E;AAC/E,qDAAiD;AAGjD,yEAAoE;AAG7D,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,iBAAoC,EACpC,aAAiD;QADjD,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,kBAAa,GAAb,aAAa,CAAoC;IACjE,CAAC;IAEJ,IAAY,YAA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L,IAAA,YAAG,EAAC,GAAG,oBAAQ,CAAC,QAAQ,SAAS,CAAC;IAEhC,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;IACf,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;IACjB,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;;;;2DAMjB;AAGK;IADL,IAAA,YAAG,EAAC,GAAG,oBAAQ,CAAC,QAAQ,kBAAkB,CAAC;IACtB,WAAA,IAAA,YAAG,GAAE,CAAA;IAAuB,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IAAgB,WAAA,IAAA,cAAK,EAAC,OAAO,CAAC,CAAA;;;;0DAkB5F;+BA1CU,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAG2B,uCAAiB;QACrB,sBAAa;GAHpC,oBAAoB,CA2ChC"}
|
|
@@ -8,6 +8,12 @@ export declare class AuthPostRegisterAttributesDTO {
|
|
|
8
8
|
marketingConsentAt?: string;
|
|
9
9
|
inviteCode?: string;
|
|
10
10
|
referralCode?: string;
|
|
11
|
+
sourceRef?: string;
|
|
12
|
+
sourceUtmSource?: string;
|
|
13
|
+
sourceUtmMedium?: string;
|
|
14
|
+
sourceUtmCampaign?: string;
|
|
15
|
+
sourceReferrer?: string;
|
|
16
|
+
sourceLandingPath?: string;
|
|
11
17
|
}
|
|
12
18
|
export declare class AuthPostRegisterDataDTO {
|
|
13
19
|
type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.post.register.dto.d.ts","sourceRoot":"","sources":["../../../../src/foundations/auth/dtos/auth.post.register.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.post.register.dto.d.ts","sourceRoot":"","sources":["../../../../src/foundations/auth/dtos/auth.post.register.dto.ts"],"names":[],"mappings":"AAeA,qBAAa,6BAA6B;IAGxC,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,IAAI,EAAE,MAAM,CAAC;IAIb,KAAK,EAAE,MAAM,CAAC;IAId,QAAQ,EAAE,MAAM,CAAC;IAIjB,eAAe,EAAE,MAAM,CAAC;IAIxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAI3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAI5B,UAAU,CAAC,EAAE,MAAM,CAAC;IAIpB,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,eAAe,CAAC,EAAE,MAAM,CAAC;IAKzB,eAAe,CAAC,EAAE,MAAM,CAAC;IAKzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAK3B,cAAc,CAAC,EAAE,MAAM,CAAC;IAKxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,qBAAa,uBAAuB;IAElC,IAAI,EAAE,MAAM,CAAC;IAGb,EAAE,EAAE,MAAM,CAAC;IAKX,UAAU,EAAE,6BAA6B,CAAC;CAC3C;AAED,qBAAa,mBAAmB;IAI9B,IAAI,EAAE,uBAAuB,CAAC;CAC/B"}
|
|
@@ -61,6 +61,42 @@ __decorate([
|
|
|
61
61
|
(0, class_validator_1.IsString)(),
|
|
62
62
|
__metadata("design:type", String)
|
|
63
63
|
], AuthPostRegisterAttributesDTO.prototype, "referralCode", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.IsOptional)(),
|
|
66
|
+
(0, class_validator_1.IsString)(),
|
|
67
|
+
(0, class_validator_1.MaxLength)(200),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], AuthPostRegisterAttributesDTO.prototype, "sourceRef", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
(0, class_validator_1.IsString)(),
|
|
73
|
+
(0, class_validator_1.MaxLength)(200),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], AuthPostRegisterAttributesDTO.prototype, "sourceUtmSource", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, class_validator_1.IsOptional)(),
|
|
78
|
+
(0, class_validator_1.IsString)(),
|
|
79
|
+
(0, class_validator_1.MaxLength)(200),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], AuthPostRegisterAttributesDTO.prototype, "sourceUtmMedium", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
(0, class_validator_1.IsString)(),
|
|
85
|
+
(0, class_validator_1.MaxLength)(200),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], AuthPostRegisterAttributesDTO.prototype, "sourceUtmCampaign", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, class_validator_1.IsOptional)(),
|
|
90
|
+
(0, class_validator_1.IsString)(),
|
|
91
|
+
(0, class_validator_1.MaxLength)(200),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], AuthPostRegisterAttributesDTO.prototype, "sourceReferrer", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, class_validator_1.IsOptional)(),
|
|
96
|
+
(0, class_validator_1.IsString)(),
|
|
97
|
+
(0, class_validator_1.MaxLength)(200),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], AuthPostRegisterAttributesDTO.prototype, "sourceLandingPath", void 0);
|
|
64
100
|
class AuthPostRegisterDataDTO {
|
|
65
101
|
}
|
|
66
102
|
exports.AuthPostRegisterDataDTO = AuthPostRegisterDataDTO;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.post.register.dto.js","sourceRoot":"","sources":["../../../../src/foundations/auth/dtos/auth.post.register.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"auth.post.register.dto.js","sourceRoot":"","sources":["../../../../src/foundations/auth/dtos/auth.post.register.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAy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IACV,IAAA,2BAAS,EAAC,GAAG,CAAC;;wEACY;AAG7B,MAAa,uBAAuB;CAWnC;AAXD,0DAWC;AATC;IADC,IAAA,wBAAM,EAAC,oBAAQ,CAAC,QAAQ,CAAC;;qDACb;AAGb;IADC,IAAA,wBAAM,GAAE;;mDACE;AAKX;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;8BAC9B,6BAA6B;2DAAC;AAG5C,MAAa,mBAAmB;CAK/B;AALD,kDAKC;AADC;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC;8BAC9B,uBAAuB;iDAAC"}
|
|
@@ -6,6 +6,7 @@ import { DiscordUserService } from "../../discord-user";
|
|
|
6
6
|
import { DiscordUserRepository } from "../../discord-user/repositories/discord-user.repository";
|
|
7
7
|
import { discordUser } from "../../discord-user/types/discord.user.type";
|
|
8
8
|
import { UserRepository } from "../../user";
|
|
9
|
+
import { WaitlistService } from "../../waitlist/services/waitlist.service";
|
|
9
10
|
import { PendingRegistrationService } from "./pending-registration.service";
|
|
10
11
|
export declare class AuthDiscordService {
|
|
11
12
|
private readonly userRepository;
|
|
@@ -15,18 +16,21 @@ export declare class AuthDiscordService {
|
|
|
15
16
|
private readonly config;
|
|
16
17
|
private readonly clsService;
|
|
17
18
|
private readonly pendingRegistrationService;
|
|
18
|
-
|
|
19
|
+
private readonly waitlistService;
|
|
20
|
+
constructor(userRepository: UserRepository, discordUserRepository: DiscordUserRepository, discordUserService: DiscordUserService, authService: AuthService, config: ConfigService<BaseConfigInterface>, clsService: ClsService, pendingRegistrationService: PendingRegistrationService, waitlistService: WaitlistService | undefined);
|
|
19
21
|
private readonly _discordApiUrl;
|
|
20
22
|
private get authConfig();
|
|
21
|
-
generateLoginUrl(inviteCode?: string, referralCode?: string): string;
|
|
23
|
+
generateLoginUrl(inviteCode?: string, referralCode?: string, source?: string): string;
|
|
22
24
|
parseStateData(state: string): {
|
|
23
25
|
invite?: string;
|
|
24
26
|
referral?: string;
|
|
27
|
+
source?: string;
|
|
25
28
|
} | undefined;
|
|
26
29
|
handleDiscordLogin(params: {
|
|
27
30
|
userDetails: discordUser;
|
|
28
31
|
inviteCode?: string;
|
|
29
32
|
referralCode?: string;
|
|
33
|
+
source?: string;
|
|
30
34
|
}): Promise<string>;
|
|
31
35
|
exchangeCodeForToken(code: string): Promise<string>;
|
|
32
36
|
fetchUserDetails(accessToken: string): Promise<discordUser>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.discord.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/auth/services/auth.discord.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAA+D,MAAM,iBAAiB,CAAC;AAEnH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAE5E,qBACa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACtC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IA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AAS;IAG/D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA8B;IAE7D,OAAO,KAAK,UAAU,GAErB;IAED,gBAAgB,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAqBrF,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;IAa5F,kBAAkB,CAAC,MAAM,EAAE;QAC/B,WAAW,EAAE,WAAW,CAAC;QACzB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,CAAC,MAAM,CAAC;IAoEb,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAoBnD,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAkBlE"}
|
|
@@ -8,6 +8,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
11
14
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
16
|
};
|
|
@@ -25,9 +28,11 @@ const auth_service_1 = require("./auth.service");
|
|
|
25
28
|
const discord_user_1 = require("../../discord-user");
|
|
26
29
|
const discord_user_repository_1 = require("../../discord-user/repositories/discord-user.repository");
|
|
27
30
|
const user_1 = require("../../user");
|
|
31
|
+
const waitlist_service_1 = require("../../waitlist/services/waitlist.service");
|
|
32
|
+
const signup_source_1 = require("../../waitlist/utils/signup-source");
|
|
28
33
|
const pending_registration_service_1 = require("./pending-registration.service");
|
|
29
34
|
let AuthDiscordService = class AuthDiscordService {
|
|
30
|
-
constructor(userRepository, discordUserRepository, discordUserService, authService, config, clsService, pendingRegistrationService) {
|
|
35
|
+
constructor(userRepository, discordUserRepository, discordUserService, authService, config, clsService, pendingRegistrationService, waitlistService) {
|
|
31
36
|
this.userRepository = userRepository;
|
|
32
37
|
this.discordUserRepository = discordUserRepository;
|
|
33
38
|
this.discordUserService = discordUserService;
|
|
@@ -35,17 +40,19 @@ let AuthDiscordService = class AuthDiscordService {
|
|
|
35
40
|
this.config = config;
|
|
36
41
|
this.clsService = clsService;
|
|
37
42
|
this.pendingRegistrationService = pendingRegistrationService;
|
|
43
|
+
this.waitlistService = waitlistService;
|
|
38
44
|
this._discordApiUrl = "https://discord.com/api/";
|
|
39
45
|
}
|
|
40
46
|
get authConfig() {
|
|
41
47
|
return this.config.get("auth");
|
|
42
48
|
}
|
|
43
|
-
generateLoginUrl(inviteCode, referralCode) {
|
|
44
|
-
// Encode invite code
|
|
49
|
+
generateLoginUrl(inviteCode, referralCode, source) {
|
|
50
|
+
// Encode invite code, referral code AND sign-up source (raw JSON string) in state parameter
|
|
45
51
|
const stateData = {
|
|
46
52
|
nonce: (0, crypto_1.randomUUID)(),
|
|
47
53
|
...(inviteCode && { invite: inviteCode }),
|
|
48
54
|
...(referralCode && { referral: referralCode }),
|
|
55
|
+
...(source && { source }),
|
|
49
56
|
};
|
|
50
57
|
const state = Buffer.from(JSON.stringify(stateData)).toString("base64url");
|
|
51
58
|
const params = new URLSearchParams({
|
|
@@ -60,7 +67,11 @@ let AuthDiscordService = class AuthDiscordService {
|
|
|
60
67
|
parseStateData(state) {
|
|
61
68
|
try {
|
|
62
69
|
const stateData = JSON.parse(Buffer.from(state, "base64url").toString());
|
|
63
|
-
return {
|
|
70
|
+
return {
|
|
71
|
+
invite: stateData.invite,
|
|
72
|
+
referral: stateData.referral,
|
|
73
|
+
source: typeof stateData.source === "string" ? stateData.source : undefined,
|
|
74
|
+
};
|
|
64
75
|
}
|
|
65
76
|
catch {
|
|
66
77
|
return undefined;
|
|
@@ -98,6 +109,15 @@ let AuthDiscordService = class AuthDiscordService {
|
|
|
98
109
|
if (registrationMode === "waitlist" && !params.inviteCode) {
|
|
99
110
|
return `${this.config.get("app").url}oauth/error?error=waitlist_required`;
|
|
100
111
|
}
|
|
112
|
+
// An invite registers only the email it was sent to. An invalid invite is
|
|
113
|
+
// left to completeOAuthRegistration, which rejects it.
|
|
114
|
+
if (registrationMode === "waitlist" && params.inviteCode && this.waitlistService) {
|
|
115
|
+
const inviteValidation = await this.waitlistService.validateInviteCode(params.inviteCode);
|
|
116
|
+
if (inviteValidation?.valid &&
|
|
117
|
+
(params.userDetails.email ?? "").trim().toLowerCase() !== (inviteValidation.email ?? "").trim().toLowerCase()) {
|
|
118
|
+
return `${this.config.get("app").url}oauth/error?error=invite_email_mismatch&invite=${encodeURIComponent(params.inviteCode)}`;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
101
121
|
// Store pending registration in Redis (include invite code AND referral code if present)
|
|
102
122
|
const pendingId = await this.pendingRegistrationService.create({
|
|
103
123
|
provider: "discord",
|
|
@@ -107,6 +127,7 @@ let AuthDiscordService = class AuthDiscordService {
|
|
|
107
127
|
avatar: params.userDetails.avatar,
|
|
108
128
|
inviteCode: params.inviteCode,
|
|
109
129
|
referralCode: params.referralCode,
|
|
130
|
+
source: (0, signup_source_1.parseSignupSourceParam)(params.source),
|
|
110
131
|
});
|
|
111
132
|
return `${this.config.get("app").url}auth/consent?pending=${pendingId}`;
|
|
112
133
|
}
|
|
@@ -144,12 +165,15 @@ let AuthDiscordService = class AuthDiscordService {
|
|
|
144
165
|
exports.AuthDiscordService = AuthDiscordService;
|
|
145
166
|
exports.AuthDiscordService = AuthDiscordService = __decorate([
|
|
146
167
|
(0, common_1.Injectable)(),
|
|
168
|
+
__param(7, (0, common_1.Optional)()),
|
|
169
|
+
__param(7, (0, common_1.Inject)(waitlist_service_1.WaitlistService)),
|
|
147
170
|
__metadata("design:paramtypes", [user_1.UserRepository,
|
|
148
171
|
discord_user_repository_1.DiscordUserRepository,
|
|
149
172
|
discord_user_1.DiscordUserService,
|
|
150
173
|
auth_service_1.AuthService,
|
|
151
174
|
config_1.ConfigService,
|
|
152
175
|
nestjs_cls_1.ClsService,
|
|
153
|
-
pending_registration_service_1.PendingRegistrationService
|
|
176
|
+
pending_registration_service_1.PendingRegistrationService,
|
|
177
|
+
waitlist_service_1.WaitlistService])
|
|
154
178
|
], AuthDiscordService);
|
|
155
179
|
//# sourceMappingURL=auth.discord.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.discord.service.js","sourceRoot":"","sources":["../../../../src/foundations/auth/services/auth.discord.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.discord.service.js","sourceRoot":"","sources":["../../../../src/foundations/auth/services/auth.discord.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAA8D;AAC9D,2CAA+C;AAC/C,kDAA0B;AAC1B,mCAAoC;AACpC,2CAAwC;AACxC,sEAAsE;AACtE,8EAA8E;AAC9E,yEAAyE;AACzE,iDAA6C;AAG7C,qDAAwD;AAExD,qGAAgG;AAEhG,qCAA4C;AAC5C,+EAA2E;AAC3E,sEAA4E;AAC5E,iFAA4E;AAGrE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YACmB,cAA8B,EAC9B,qBAA4C,EAC5C,kBAAsC,EACtC,WAAwB,EACxB,MAA0C,EAC1C,UAAsB,EACtB,0BAAsD,EAKvE,eAA6D;QAX5C,mBAAc,GAAd,cAAc,CAAgB;QAC9B,0BAAqB,GAArB,qBAAqB,CAAuB;Q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C;aACpD;SACF,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,WAAmB;QACxC,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,cAAc,WAAW,EAAE;YAClE,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,WAAW,EAAE;aACvC;SACF,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM;YACpC,CAAC,CAAC,uCAAuC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,MAAM;YACvF,CAAC,CAAC,IAAI,CAAC;QAET,OAAO;YACL,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE;YACpB,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;YAC1B,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ;YAChC,MAAM,EAAE,SAAS;SAClB,CAAC;IACJ,CAAC;CACF,CAAA;AAvKY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;IAYR,WAAA,IAAA,iBAAQ,GAAE,CAAA;IACV,WAAA,IAAA,eAAM,EAAC,kCAAe,CAAC,CAAA;qCAVS,qBAAc;QACP,+CAAqB;QACxB,iCAAkB;QACzB,0BAAW;QAChB,sBAAa;QACT,uBAAU;QACM,yDAA0B;QAKrC,kCAAe;GAbxC,kBAAkB,CAuK9B"}
|
|
@@ -5,6 +5,7 @@ import { BaseConfigInterface } from "../../../config";
|
|
|
5
5
|
import { GoogleUserRepository } from "../../google-user/repositories/google-user.repository";
|
|
6
6
|
import { googleUser } from "../../google-user/types/google.user.type";
|
|
7
7
|
import { UserRepository } from "../../user";
|
|
8
|
+
import { WaitlistService } from "../../waitlist/services/waitlist.service";
|
|
8
9
|
import { PendingRegistrationService } from "./pending-registration.service";
|
|
9
10
|
export declare class AuthGoogleService {
|
|
10
11
|
private readonly userRepository;
|
|
@@ -13,20 +14,23 @@ export declare class AuthGoogleService {
|
|
|
13
14
|
private readonly config;
|
|
14
15
|
private readonly clsService;
|
|
15
16
|
private readonly pendingRegistrationService;
|
|
16
|
-
|
|
17
|
+
private readonly waitlistService;
|
|
18
|
+
constructor(userRepository: UserRepository, googleUserRepository: GoogleUserRepository, authService: AuthService, config: ConfigService<BaseConfigInterface>, clsService: ClsService, pendingRegistrationService: PendingRegistrationService, waitlistService: WaitlistService | undefined);
|
|
17
19
|
private readonly _googleAuthUrl;
|
|
18
20
|
private readonly _googleTokenUrl;
|
|
19
21
|
private readonly _googleUserInfoUrl;
|
|
20
22
|
private get authConfig();
|
|
21
|
-
generateLoginUrl(inviteCode?: string, referralCode?: string): string;
|
|
23
|
+
generateLoginUrl(inviteCode?: string, referralCode?: string, source?: string): string;
|
|
22
24
|
parseStateData(state: string): {
|
|
23
25
|
invite?: string;
|
|
24
26
|
referral?: string;
|
|
27
|
+
source?: string;
|
|
25
28
|
} | undefined;
|
|
26
29
|
handleGoogleLogin(params: {
|
|
27
30
|
userDetails: googleUser;
|
|
28
31
|
inviteCode?: string;
|
|
29
32
|
referralCode?: string;
|
|
33
|
+
source?: string;
|
|
30
34
|
}): Promise<string>;
|
|
31
35
|
exchangeCodeForToken(code: string): Promise<string>;
|
|
32
36
|
fetchUserDetails(accessToken: string): Promise<googleUser>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.google.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/auth/services/auth.google.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAKxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAA+D,MAAM,iBAAiB,CAAC;AA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
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
11
14
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
16
|
};
|
|
@@ -25,15 +28,18 @@ const nestjs_cls_1 = require("nestjs-cls");
|
|
|
25
28
|
const auth_service_1 = require("./auth.service");
|
|
26
29
|
const google_user_repository_1 = require("../../google-user/repositories/google-user.repository");
|
|
27
30
|
const user_1 = require("../../user");
|
|
31
|
+
const waitlist_service_1 = require("../../waitlist/services/waitlist.service");
|
|
32
|
+
const signup_source_1 = require("../../waitlist/utils/signup-source");
|
|
28
33
|
const pending_registration_service_1 = require("./pending-registration.service");
|
|
29
34
|
let AuthGoogleService = class AuthGoogleService {
|
|
30
|
-
constructor(userRepository, googleUserRepository, authService, config, clsService, pendingRegistrationService) {
|
|
35
|
+
constructor(userRepository, googleUserRepository, authService, config, clsService, pendingRegistrationService, waitlistService) {
|
|
31
36
|
this.userRepository = userRepository;
|
|
32
37
|
this.googleUserRepository = googleUserRepository;
|
|
33
38
|
this.authService = authService;
|
|
34
39
|
this.config = config;
|
|
35
40
|
this.clsService = clsService;
|
|
36
41
|
this.pendingRegistrationService = pendingRegistrationService;
|
|
42
|
+
this.waitlistService = waitlistService;
|
|
37
43
|
this._googleAuthUrl = "https://accounts.google.com/o/oauth2/v2/auth";
|
|
38
44
|
this._googleTokenUrl = "https://oauth2.googleapis.com/token";
|
|
39
45
|
this._googleUserInfoUrl = "https://www.googleapis.com/oauth2/v2/userinfo";
|
|
@@ -41,12 +47,13 @@ let AuthGoogleService = class AuthGoogleService {
|
|
|
41
47
|
get authConfig() {
|
|
42
48
|
return this.config.get("auth");
|
|
43
49
|
}
|
|
44
|
-
generateLoginUrl(inviteCode, referralCode) {
|
|
45
|
-
// Encode invite code
|
|
50
|
+
generateLoginUrl(inviteCode, referralCode, source) {
|
|
51
|
+
// Encode invite code, referral code AND sign-up source (raw JSON string) in state parameter
|
|
46
52
|
const stateData = {
|
|
47
53
|
nonce: (0, crypto_1.randomUUID)(),
|
|
48
54
|
...(inviteCode && { invite: inviteCode }),
|
|
49
55
|
...(referralCode && { referral: referralCode }),
|
|
56
|
+
...(source && { source }),
|
|
50
57
|
};
|
|
51
58
|
const state = Buffer.from(JSON.stringify(stateData)).toString("base64url");
|
|
52
59
|
const params = new URLSearchParams({
|
|
@@ -62,7 +69,11 @@ let AuthGoogleService = class AuthGoogleService {
|
|
|
62
69
|
parseStateData(state) {
|
|
63
70
|
try {
|
|
64
71
|
const stateData = JSON.parse(Buffer.from(state, "base64url").toString());
|
|
65
|
-
return {
|
|
72
|
+
return {
|
|
73
|
+
invite: stateData.invite,
|
|
74
|
+
referral: stateData.referral,
|
|
75
|
+
source: typeof stateData.source === "string" ? stateData.source : undefined,
|
|
76
|
+
};
|
|
66
77
|
}
|
|
67
78
|
catch {
|
|
68
79
|
return undefined;
|
|
@@ -100,6 +111,15 @@ let AuthGoogleService = class AuthGoogleService {
|
|
|
100
111
|
if (registrationMode === "waitlist" && !params.inviteCode) {
|
|
101
112
|
return `${this.config.get("app").url}oauth/error?error=waitlist_required`;
|
|
102
113
|
}
|
|
114
|
+
// An invite registers only the email it was sent to. An invalid invite is
|
|
115
|
+
// left to completeOAuthRegistration, which rejects it.
|
|
116
|
+
if (registrationMode === "waitlist" && params.inviteCode && this.waitlistService) {
|
|
117
|
+
const inviteValidation = await this.waitlistService.validateInviteCode(params.inviteCode);
|
|
118
|
+
if (inviteValidation?.valid &&
|
|
119
|
+
(params.userDetails.email ?? "").trim().toLowerCase() !== (inviteValidation.email ?? "").trim().toLowerCase()) {
|
|
120
|
+
return `${this.config.get("app").url}oauth/error?error=invite_email_mismatch&invite=${encodeURIComponent(params.inviteCode)}`;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
103
123
|
// Store pending registration in Redis (include invite code AND referral code if present)
|
|
104
124
|
const pendingId = await this.pendingRegistrationService.create({
|
|
105
125
|
provider: "google",
|
|
@@ -109,6 +129,7 @@ let AuthGoogleService = class AuthGoogleService {
|
|
|
109
129
|
avatar: params.userDetails.picture,
|
|
110
130
|
inviteCode: params.inviteCode,
|
|
111
131
|
referralCode: params.referralCode,
|
|
132
|
+
source: (0, signup_source_1.parseSignupSourceParam)(params.source),
|
|
112
133
|
});
|
|
113
134
|
return `${this.config.get("app").url}auth/consent?pending=${pendingId}`;
|
|
114
135
|
}
|
|
@@ -145,11 +166,14 @@ let AuthGoogleService = class AuthGoogleService {
|
|
|
145
166
|
exports.AuthGoogleService = AuthGoogleService;
|
|
146
167
|
exports.AuthGoogleService = AuthGoogleService = __decorate([
|
|
147
168
|
(0, common_1.Injectable)(),
|
|
169
|
+
__param(6, (0, common_1.Optional)()),
|
|
170
|
+
__param(6, (0, common_1.Inject)(waitlist_service_1.WaitlistService)),
|
|
148
171
|
__metadata("design:paramtypes", [user_1.UserRepository,
|
|
149
172
|
google_user_repository_1.GoogleUserRepository,
|
|
150
173
|
auth_service_1.AuthService,
|
|
151
174
|
config_1.ConfigService,
|
|
152
175
|
nestjs_cls_1.ClsService,
|
|
153
|
-
pending_registration_service_1.PendingRegistrationService
|
|
176
|
+
pending_registration_service_1.PendingRegistrationService,
|
|
177
|
+
waitlist_service_1.WaitlistService])
|
|
154
178
|
], AuthGoogleService);
|
|
155
179
|
//# sourceMappingURL=auth.google.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.google.service.js","sourceRoot":"","sources":["../../../../src/foundations/auth/services/auth.google.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.google.service.js","sourceRoot":"","sources":["../../../../src/foundations/auth/services/auth.google.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAA8D;AAC9D,2CAA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,GAAE,CAAA;IACV,WAAA,IAAA,eAAM,EAAC,kCAAe,CAAC,CAAA;qCATS,qBAAc;QACR,6CAAoB;QAC7B,0BAAW;QAChB,sBAAa;QACT,uBAAU;QACM,yDAA0B;QAKrC,kCAAe;GAZxC,iBAAiB,CAuK7B"}
|
|
@@ -148,6 +148,18 @@ export declare class AuthService extends AbstractService<Auth, typeof AuthDescri
|
|
|
148
148
|
}): Promise<{
|
|
149
149
|
code: string;
|
|
150
150
|
}>;
|
|
151
|
+
/**
|
|
152
|
+
* An invite code registers only the email it was sent to. Case and
|
|
153
|
+
* surrounding spaces are ignored.
|
|
154
|
+
*/
|
|
155
|
+
private assertInviteEmail;
|
|
156
|
+
/**
|
|
157
|
+
* Stores the sign-up source on a new user. The waitlist entry is the earlier
|
|
158
|
+
* first touch, so when it carries any source field it wins over whatever the
|
|
159
|
+
* browser sent. Nothing is written when neither has a source. A failure is
|
|
160
|
+
* logged, never thrown: the account already exists at this point.
|
|
161
|
+
*/
|
|
162
|
+
private applySignupSource;
|
|
151
163
|
/**
|
|
152
164
|
* Send notification to all platform administrators about a new user registration.
|
|
153
165
|
* Errors are logged but not thrown to avoid blocking the activation flow.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/auth/services/auth.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAA+B,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAChH,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,mBAAmB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