@tc-libs/authentication 3.3.0 → 3.4.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/package.json +3 -3
- package/src/authentication.module.js +52 -6
- package/src/authentication.module.js.map +1 -1
- package/src/authentication.module.options.d.ts +2 -2
- package/src/guards/apple/auth.apple-oauth.strategy.js +10 -6
- package/src/guards/apple/auth.apple-oauth.strategy.js.map +1 -1
- package/src/guards/google-oauth/auth.google-oauth.strategy.d.ts +1 -0
- package/src/guards/google-oauth/auth.google-oauth.strategy.js +11 -6
- package/src/guards/google-oauth/auth.google-oauth.strategy.js.map +1 -1
- package/src/guards/index.d.ts +2 -0
- package/src/guards/index.js +2 -0
- package/src/guards/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tc-libs/authentication",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@tc-libs/errors": "3.
|
|
6
|
-
"@tc-libs/helper": "3.
|
|
5
|
+
"@tc-libs/errors": "3.4.0",
|
|
6
|
+
"@tc-libs/helper": "3.4.0",
|
|
7
7
|
"@nestjs/common": "^11.0.12",
|
|
8
8
|
"@nestjs/passport": "^11.0.5",
|
|
9
9
|
"@nestjs/jwt": "^11.0.0",
|
|
@@ -1,33 +1,77 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthModule = void 0;
|
|
4
|
+
const jwt_1 = require("@nestjs/jwt");
|
|
4
5
|
const guards_1 = require("./guards");
|
|
5
6
|
const services_1 = require("./services");
|
|
6
7
|
const authentication_module_options_1 = require("./authentication.module.options");
|
|
7
8
|
const auth_combined_guard_1 = require("./guards/combined/auth.combined.guard");
|
|
8
|
-
const
|
|
9
|
+
const baseProviders = [
|
|
9
10
|
services_1.AuthService,
|
|
11
|
+
jwt_1.JwtService,
|
|
10
12
|
guards_1.AuthJwtAccessStrategy,
|
|
11
13
|
auth_combined_guard_1.CombinedAuthGuard,
|
|
12
14
|
guards_1.AuthJwtAccessGuard,
|
|
13
15
|
guards_1.AuthJwtRefreshStrategy,
|
|
14
|
-
guards_1.
|
|
16
|
+
guards_1.AppleOAuthGuard,
|
|
15
17
|
guards_1.GoogleOAuthGuard,
|
|
16
18
|
guards_1.AuthPermissionGuard,
|
|
17
19
|
guards_1.AuthPayloadPermissionGuard,
|
|
18
20
|
guards_1.AuthJwtRefreshGuard,
|
|
19
21
|
guards_1.AuthPayloadAccessForGuard,
|
|
20
22
|
];
|
|
23
|
+
const googleStrategyProvider = {
|
|
24
|
+
provide: guards_1.GoogleStrategy,
|
|
25
|
+
inject: [authentication_module_options_1.AUTHENTICATION_CONFIG_OPTIONS],
|
|
26
|
+
useFactory: (moduleOptions) => {
|
|
27
|
+
if (!hasGoogleConfig(moduleOptions)) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return new guards_1.GoogleStrategy(moduleOptions);
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
const appleStrategyProvider = {
|
|
34
|
+
provide: guards_1.AppleStrategy,
|
|
35
|
+
inject: [authentication_module_options_1.AUTHENTICATION_CONFIG_OPTIONS, jwt_1.JwtService],
|
|
36
|
+
useFactory: (moduleOptions, jwtService) => {
|
|
37
|
+
if (!hasAppleConfig(moduleOptions)) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return new guards_1.AppleStrategy(moduleOptions, jwtService);
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
function hasGoogleConfig(options) {
|
|
44
|
+
const googleOptions = options.google;
|
|
45
|
+
return Boolean(googleOptions?.clientID &&
|
|
46
|
+
googleOptions.clientSecret &&
|
|
47
|
+
googleOptions.callbackURL);
|
|
48
|
+
}
|
|
49
|
+
function hasAppleConfig(options) {
|
|
50
|
+
const appleOptions = options.apple;
|
|
51
|
+
return Boolean(appleOptions?.clientID &&
|
|
52
|
+
appleOptions.teamID &&
|
|
53
|
+
appleOptions.keyID &&
|
|
54
|
+
appleOptions.privateKeyString &&
|
|
55
|
+
appleOptions.callbackURL);
|
|
56
|
+
}
|
|
21
57
|
class AuthModule {
|
|
22
58
|
static register(options, isGlobal) {
|
|
59
|
+
const hasGoogle = hasGoogleConfig(options);
|
|
60
|
+
const hasApple = hasAppleConfig(options);
|
|
23
61
|
return {
|
|
24
62
|
module: AuthModule,
|
|
25
63
|
imports: [],
|
|
26
64
|
providers: [
|
|
27
65
|
{ provide: authentication_module_options_1.AUTHENTICATION_CONFIG_OPTIONS, useValue: options },
|
|
28
|
-
...
|
|
66
|
+
...baseProviders,
|
|
67
|
+
...(hasApple ? [appleStrategyProvider] : []),
|
|
68
|
+
...(hasGoogle ? [googleStrategyProvider] : []),
|
|
69
|
+
],
|
|
70
|
+
exports: [
|
|
71
|
+
...baseProviders,
|
|
72
|
+
...(hasApple ? [guards_1.AppleStrategy] : []),
|
|
73
|
+
...(hasGoogle ? [guards_1.GoogleStrategy] : []),
|
|
29
74
|
],
|
|
30
|
-
exports: providers,
|
|
31
75
|
global: isGlobal,
|
|
32
76
|
};
|
|
33
77
|
}
|
|
@@ -41,9 +85,11 @@ class AuthModule {
|
|
|
41
85
|
useFactory: options.useFactory,
|
|
42
86
|
inject: options.inject,
|
|
43
87
|
},
|
|
44
|
-
...
|
|
88
|
+
...baseProviders,
|
|
89
|
+
appleStrategyProvider,
|
|
90
|
+
googleStrategyProvider,
|
|
45
91
|
],
|
|
46
|
-
exports:
|
|
92
|
+
exports: [...baseProviders, guards_1.AppleStrategy, guards_1.GoogleStrategy],
|
|
47
93
|
global: isGlobal,
|
|
48
94
|
};
|
|
49
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.module.js","sourceRoot":"","sources":["../../../../packages/authentication/src/authentication.module.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"authentication.module.js","sourceRoot":"","sources":["../../../../packages/authentication/src/authentication.module.ts"],"names":[],"mappings":";;;AACA,qCAAyC;AACzC,qCAYkB;AAClB,yCAAyC;AACzC,mFAGyC;AACzC,+EAA0E;AAE1E,MAAM,aAAa,GAAe;IAChC,sBAAW;IACX,gBAAU;IACV,8BAAqB;IACrB,uCAAiB;IACjB,2BAAkB;IAClB,+BAAsB;IACtB,wBAAe;IACf,yBAAgB;IAChB,4BAAmB;IACnB,mCAA0B;IAC1B,4BAAmB;IACnB,kCAAyB;CAC1B,CAAC;AAEF,MAAM,sBAAsB,GAAa;IACvC,OAAO,EAAE,uBAAc;IACvB,MAAM,EAAE,CAAC,6DAA6B,CAAC;IACvC,UAAU,EAAE,CAAC,aAA0C,EAAE,EAAE;QACzD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,IAAI,uBAAc,CAAC,aAAa,CAAC,CAAC;IAC3C,CAAC;CACF,CAAC;AAEF,MAAM,qBAAqB,GAAa;IACtC,OAAO,EAAE,sBAAa;IACtB,MAAM,EAAE,CAAC,6DAA6B,EAAE,gBAAU,CAAC;IACnD,UAAU,EAAE,CACV,aAA0C,EAC1C,UAAsB,EACtB,EAAE;QACF,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,IAAI,sBAAa,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IACtD,CAAC;CACF,CAAC;AAEF,SAAS,eAAe,CAAC,OAAoC;IAC3D,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IAErC,OAAO,OAAO,CACZ,aAAa,EAAE,QAAQ;QACrB,aAAa,CAAC,YAAY;QAC1B,aAAa,CAAC,WAAW,CAC5B,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,OAAoC;IAC1D,MAAM,YAAY,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UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;iBACvB;gBACD,GAAG,aAAa;gBAChB,qBAAqB;gBACrB,sBAAsB;aACvB;YACD,OAAO,EAAE,CAAC,GAAG,aAAa,EAAE,sBAAa,EAAE,uBAAc,CAAC;YAC1D,MAAM,EAAE,QAAQ;SACjB,CAAC;IACJ,CAAC;CACF;AA/CD,gCA+CC"}
|
|
@@ -6,7 +6,7 @@ export interface AuthenticationModuleOptions {
|
|
|
6
6
|
defaultSecretKey: string;
|
|
7
7
|
defaultExpirationTime: number;
|
|
8
8
|
};
|
|
9
|
-
google
|
|
9
|
+
google?: {
|
|
10
10
|
clientID: string;
|
|
11
11
|
clientSecret: string;
|
|
12
12
|
callbackURL: string;
|
|
@@ -14,7 +14,7 @@ export interface AuthenticationModuleOptions {
|
|
|
14
14
|
getBirthday: boolean;
|
|
15
15
|
getPhoneNumber: boolean;
|
|
16
16
|
};
|
|
17
|
-
apple
|
|
17
|
+
apple?: {
|
|
18
18
|
clientID: string;
|
|
19
19
|
teamID: string;
|
|
20
20
|
keyID: string;
|
|
@@ -9,13 +9,17 @@ const passport_apple_1 = require("passport-apple");
|
|
|
9
9
|
const authentication_module_options_1 = require("../../authentication.module.options");
|
|
10
10
|
let AppleStrategy = class AppleStrategy extends (0, passport_1.PassportStrategy)(passport_apple_1.Strategy, 'apple') {
|
|
11
11
|
constructor(_options, _jwt) {
|
|
12
|
+
const appleOptions = _options.apple;
|
|
13
|
+
if (!appleOptions) {
|
|
14
|
+
throw new Error('Apple authentication configuration is missing.');
|
|
15
|
+
}
|
|
12
16
|
super({
|
|
13
|
-
clientID:
|
|
14
|
-
teamID:
|
|
15
|
-
callbackURL:
|
|
16
|
-
keyID:
|
|
17
|
-
privateKeyString:
|
|
18
|
-
scope:
|
|
17
|
+
clientID: appleOptions.clientID,
|
|
18
|
+
teamID: appleOptions.teamID,
|
|
19
|
+
callbackURL: appleOptions.callbackURL,
|
|
20
|
+
keyID: appleOptions.keyID,
|
|
21
|
+
privateKeyString: appleOptions.privateKeyString,
|
|
22
|
+
scope: appleOptions.scope,
|
|
19
23
|
passReqToCallback: true,
|
|
20
24
|
});
|
|
21
25
|
this._options = _options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.apple-oauth.strategy.js","sourceRoot":"","sources":["../../../../../../packages/authentication/src/guards/apple/auth.apple-oauth.strategy.ts"],"names":[],"mappings":";;;;AAAA,2CAAoD;AACpD,qCAAyC;AACzC,+CAAoD;AACpD,mDAA0C;AAC1C,uFAG6C;AAGtC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,IAAA,2BAAgB,EAAC,yBAAQ,EAAE,OAAO,CAAC;IACpE,YAEW,QAAqC,EAC7B,IAAgB;QAEjC,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.apple-oauth.strategy.js","sourceRoot":"","sources":["../../../../../../packages/authentication/src/guards/apple/auth.apple-oauth.strategy.ts"],"names":[],"mappings":";;;;AAAA,2CAAoD;AACpD,qCAAyC;AACzC,+CAAoD;AACpD,mDAA0C;AAC1C,uFAG6C;AAGtC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,IAAA,2BAAgB,EAAC,yBAAQ,EAAE,OAAO,CAAC;IACpE,YAEW,QAAqC,EAC7B,IAAgB;QAEjC,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC;QAEpC,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;QACpE,CAAC;QAED,KAAK,CAAC;YACJ,QAAQ,EAAE,YAAY,CAAC,QAAQ;YAC/B,MAAM,EAAE,YAAY,CAAC,MAAM;YAC3B,WAAW,EAAE,YAAY,CAAC,WAAW;YACrC,KAAK,EAAE,YAAY,CAAC,KAAK;YACzB,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;YAC/C,KAAK,EAAE,YAAY,CAAC,KAAK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@@ declare const GoogleStrategy_base: new (...args: [options: import("passport-goog
|
|
|
11
11
|
};
|
|
12
12
|
export declare class GoogleStrategy extends GoogleStrategy_base {
|
|
13
13
|
readonly _options: AuthenticationModuleOptions;
|
|
14
|
+
private readonly googleOptions;
|
|
14
15
|
constructor(_options: AuthenticationModuleOptions);
|
|
15
16
|
fetchPhoneNumber(accessToken: string): Promise<string | null>;
|
|
16
17
|
fetchBirthday(accessToken: string): Promise<IBirthday | null>;
|
|
@@ -8,13 +8,18 @@ const passport_google_oauth20_1 = require("passport-google-oauth20");
|
|
|
8
8
|
const authentication_module_options_1 = require("../../authentication.module.options");
|
|
9
9
|
let GoogleStrategy = class GoogleStrategy extends (0, passport_1.PassportStrategy)(passport_google_oauth20_1.Strategy, 'google') {
|
|
10
10
|
constructor(_options) {
|
|
11
|
+
const googleOptions = _options.google;
|
|
12
|
+
if (!googleOptions) {
|
|
13
|
+
throw new Error('Google authentication configuration is missing.');
|
|
14
|
+
}
|
|
11
15
|
super({
|
|
12
|
-
clientID:
|
|
13
|
-
clientSecret:
|
|
14
|
-
callbackURL:
|
|
15
|
-
scope:
|
|
16
|
+
clientID: googleOptions.clientID,
|
|
17
|
+
clientSecret: googleOptions.clientSecret,
|
|
18
|
+
callbackURL: googleOptions.callbackURL,
|
|
19
|
+
scope: googleOptions.scope,
|
|
16
20
|
});
|
|
17
21
|
this._options = _options;
|
|
22
|
+
this.googleOptions = googleOptions;
|
|
18
23
|
}
|
|
19
24
|
async fetchPhoneNumber(accessToken) {
|
|
20
25
|
const res = await fetch('https://people.googleapis.com/v1/people/me?personFields=phoneNumbers', {
|
|
@@ -52,11 +57,11 @@ let GoogleStrategy = class GoogleStrategy extends (0, passport_1.PassportStrateg
|
|
|
52
57
|
accessToken,
|
|
53
58
|
refreshToken,
|
|
54
59
|
};
|
|
55
|
-
if (this.
|
|
60
|
+
if (this.googleOptions.getBirthday) {
|
|
56
61
|
const bday = await this.fetchBirthday(accessToken);
|
|
57
62
|
data.birthday = bday;
|
|
58
63
|
}
|
|
59
|
-
if (this.
|
|
64
|
+
if (this.googleOptions.getPhoneNumber) {
|
|
60
65
|
const phone = await this.fetchPhoneNumber(accessToken);
|
|
61
66
|
data.phone = phone;
|
|
62
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.google-oauth.strategy.js","sourceRoot":"","sources":["../../../../../../packages/authentication/src/guards/google-oauth/auth.google-oauth.strategy.ts"],"names":[],"mappings":";;;;AAAA,2CAAoD;AACpD,+CAAoD;AACpD,qEAA4D;AAC5D,uFAG6C;AAUtC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,IAAA,2BAAgB,EAAC,kCAAQ,EAAE,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.google-oauth.strategy.js","sourceRoot":"","sources":["../../../../../../packages/authentication/src/guards/google-oauth/auth.google-oauth.strategy.ts"],"names":[],"mappings":";;;;AAAA,2CAAoD;AACpD,+CAAoD;AACpD,qEAA4D;AAC5D,uFAG6C;AAUtC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,IAAA,2BAAgB,EAAC,kCAAQ,EAAE,QAAQ,CAAC;IAKtE,YAEW,QAAqC;QAE9C,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC;QAEtC,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACrE,CAAC;QAED,KAAK,CAAC;YACJ,QAAQ,EAAE,aAAa,CAAC,QAAQ;YAChC,YAAY,EAAE,aAAa,CAAC,YAAY;YACxC,WAAW,EAAE,aAAa,CAAC,WAAW;YACtC,KAAK,EAAE,aAAa,CAAC,KAAK;SAC3B,CAAC,CAAC;QAbM,aAAQ,GAAR,QAAQ,CAA6B;QAe9C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,WAAmB;QACxC,MAAM,GAAG,GAAG,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
|
6
6
|
export * from './payload/auth.payload.permission.guard';
|
|
7
7
|
export * from './permission/auth.permission.guard';
|
|
8
|
+
export * from './apple/auth.apple-oauth.guard';
|
|
9
|
+
export * from './apple/auth.apple-oauth.strategy';
|
|
8
10
|
export * from './google-oauth/auth.google-oauth.guard';
|
|
9
11
|
export * from './google-oauth/auth.google-oauth.strategy';
|
package/src/guards/index.js
CHANGED
|
@@ -8,6 +8,8 @@ tslib_1.__exportStar(require("./jwt-refresh/auth.jwt-refresh.strategy"), exports
|
|
|
8
8
|
tslib_1.__exportStar(require("./payload/auth.payload.access-for.guard"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./payload/auth.payload.permission.guard"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./permission/auth.permission.guard"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./apple/auth.apple-oauth.guard"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./apple/auth.apple-oauth.strategy"), exports);
|
|
11
13
|
tslib_1.__exportStar(require("./google-oauth/auth.google-oauth.guard"), exports);
|
|
12
14
|
tslib_1.__exportStar(require("./google-oauth/auth.google-oauth.strategy"), exports);
|
|
13
15
|
//# sourceMappingURL=index.js.map
|
package/src/guards/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/authentication/src/guards/index.ts"],"names":[],"mappings":";;;AAAA,6EAAmD;AACnD,gFAAsD;AACtD,+EAAqD;AACrD,kFAAwD;AACxD,kFAAwD;AACxD,kFAAwD;AACxD,6EAAmD;AACnD,iFAAuD;AACvD,oFAA0D"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/authentication/src/guards/index.ts"],"names":[],"mappings":";;;AAAA,6EAAmD;AACnD,gFAAsD;AACtD,+EAAqD;AACrD,kFAAwD;AACxD,kFAAwD;AACxD,kFAAwD;AACxD,6EAAmD;AACnD,yEAA+C;AAC/C,4EAAkD;AAClD,iFAAuD;AACvD,oFAA0D"}
|