@vynelix/nestjs-multi-auth 1.0.2 → 1.0.3
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/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/dist/auth/auth.module.js +28 -28
- package/dist/auth/auth.module.js.map +1 -1
- package/dist/auth/core/database-otp.provider.js +14 -4
- package/dist/auth/core/database-otp.provider.js.map +1 -1
- package/dist/auth/decorator/current-user.decorator.d.ts +1 -1
- package/dist/auth/interfaces/auth-module-async-options.interface.d.ts +2 -0
- package/dist/auth/strategies/local-auth.strategy.js +1 -0
- package/dist/auth/strategies/local-auth.strategy.js.map +1 -1
- package/dist/database/typeorm/entities/entities.d.ts +1 -1
- package/dist/database/typeorm/migrations/auth-entities.d.ts +1 -1
- package/dist/database/typeorm/repositories/auth-identifier.repository.js +11 -6
- package/dist/database/typeorm/repositories/auth-identifier.repository.js.map +1 -1
- package/dist/database/typeorm/repositories/otp-token.repository.js +2 -1
- package/dist/database/typeorm/repositories/otp-token.repository.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/auth/auth-type.enum.d.ts +0 -22
- package/dist/auth/auth-type.enum.js +0 -32
- package/dist/auth/auth-type.enum.js.map +0 -1
- package/dist/auth/core/cookie-namespace.resolver.d.ts +0 -8
- package/dist/auth/core/cookie-namespace.resolver.js +0 -48
- package/dist/auth/core/cookie-namespace.resolver.js.map +0 -1
- package/dist/auth/current-user-interface.d.ts +0 -4
- package/dist/auth/current-user-interface.js +0 -4
- package/dist/auth/current-user-interface.js.map +0 -1
- package/dist/auth/current-user.decorator.d.ts +0 -2
- package/dist/auth/current-user.decorator.js +0 -16
- package/dist/auth/current-user.decorator.js.map +0 -1
- package/dist/auth/dto/auth-response.dto.d.ts +0 -17
- package/dist/auth/dto/auth-response.dto.js +0 -83
- package/dist/auth/dto/auth-response.dto.js.map +0 -1
- package/dist/auth/dto/identifier-response.dto.d.ts +0 -8
- package/dist/auth/dto/identifier-response.dto.js +0 -46
- package/dist/auth/dto/identifier-response.dto.js.map +0 -1
- package/dist/auth/dto/login.dto.d.ts +0 -11
- package/dist/auth/dto/login.dto.js +0 -68
- package/dist/auth/dto/login.dto.js.map +0 -1
- package/dist/auth/dto/mfa.dto.d.ts +0 -8
- package/dist/auth/dto/mfa.dto.js +0 -51
- package/dist/auth/dto/mfa.dto.js.map +0 -1
- package/dist/auth/dto/oauth-provider-response.dto.d.ts +0 -5
- package/dist/auth/dto/oauth-provider-response.dto.js +0 -30
- package/dist/auth/dto/oauth-provider-response.dto.js.map +0 -1
- package/dist/auth/dto/refresh-token.dto.d.ts +0 -3
- package/dist/auth/dto/refresh-token.dto.js +0 -28
- package/dist/auth/dto/refresh-token.dto.js.map +0 -1
- package/dist/auth/dto/signup.dto.d.ts +0 -13
- package/dist/auth/dto/signup.dto.js +0 -70
- package/dist/auth/dto/signup.dto.js.map +0 -1
- package/dist/auth/dto/verify.dto.d.ts +0 -7
- package/dist/auth/dto/verify.dto.js +0 -48
- package/dist/auth/dto/verify.dto.js.map +0 -1
- package/dist/auth/entities/auth-identify.entity.d.ts +0 -33
- package/dist/auth/entities/auth-identify.entity.js +0 -73
- package/dist/auth/entities/auth-identify.entity.js.map +0 -1
- package/dist/auth/entities/auth.entity.d.ts +0 -45
- package/dist/auth/entities/auth.entity.js +0 -129
- package/dist/auth/entities/auth.entity.js.map +0 -1
- package/dist/auth/entities/base.entity.d.ts +0 -6
- package/dist/auth/entities/base.entity.js +0 -41
- package/dist/auth/entities/base.entity.js.map +0 -1
- package/dist/auth/entities/entities.d.ts +0 -7
- package/dist/auth/entities/entities.js +0 -18
- package/dist/auth/entities/entities.js.map +0 -1
- package/dist/auth/entities/mfa-method.entity.d.ts +0 -23
- package/dist/auth/entities/mfa-method.entity.js +0 -69
- package/dist/auth/entities/mfa-method.entity.js.map +0 -1
- package/dist/auth/entities/oauth-provider.entity.d.ts +0 -38
- package/dist/auth/entities/oauth-provider.entity.js +0 -88
- package/dist/auth/entities/oauth-provider.entity.js.map +0 -1
- package/dist/auth/entities/otp-token.entity.d.ts +0 -22
- package/dist/auth/entities/otp-token.entity.js +0 -61
- package/dist/auth/entities/otp-token.entity.js.map +0 -1
- package/dist/auth/entities/session.entity.d.ts +0 -21
- package/dist/auth/entities/session.entity.js +0 -71
- package/dist/auth/entities/session.entity.js.map +0 -1
- package/dist/auth/entities/session_log.entity.d.ts +0 -31
- package/dist/auth/entities/session_log.entity.js +0 -85
- package/dist/auth/entities/session_log.entity.js.map +0 -1
- package/dist/auth/interfaces/auth-user-service.interface.d.ts +0 -13
- package/dist/auth/interfaces/auth-user-service.interface.js +0 -7
- package/dist/auth/interfaces/auth-user-service.interface.js.map +0 -1
- package/dist/auth/interfaces/current-user.decorator.d.ts +0 -2
- package/dist/auth/interfaces/current-user.decorator.js +0 -16
- package/dist/auth/interfaces/current-user.decorator.js.map +0 -1
- package/dist/auth/jwt-payload-interface.d.ts +0 -4
- package/dist/auth/jwt-payload-interface.js +0 -3
- package/dist/auth/jwt-payload-interface.js.map +0 -1
- package/dist/auth/jwt.strategy.d.ts +0 -13
- package/dist/auth/jwt.strategy.js +0 -60
- package/dist/auth/jwt.strategy.js.map +0 -1
- package/dist/auth/strategies/company.strategy.d.ts +0 -0
- package/dist/auth/strategies/company.strategy.js +0 -1
- package/dist/auth/strategies/company.strategy.js.map +0 -1
- package/dist/auth/strategies/google.strategy.d.ts +0 -7
- package/dist/auth/strategies/google.strategy.js +0 -23
- package/dist/auth/strategies/google.strategy.js.map +0 -1
- package/dist/auth/strategies/oauth/oauth-strategy.interface.d.ts +0 -14
- package/dist/auth/strategies/oauth/oauth-strategy.interface.js +0 -3
- package/dist/auth/strategies/oauth/oauth-strategy.interface.js.map +0 -1
- package/dist/auth/strategies/otp.strategy.d.ts +0 -7
- package/dist/auth/strategies/otp.strategy.js +0 -23
- package/dist/auth/strategies/otp.strategy.js.map +0 -1
- package/dist/auth/strategies/password.strategy.d.ts +0 -14
- package/dist/auth/strategies/password.strategy.js +0 -130
- package/dist/auth/strategies/password.strategy.js.map +0 -1
- package/dist/migrations/auth-entities.d.ts +0 -7
- package/dist/migrations/auth-entities.js +0 -18
- package/dist/migrations/auth-entities.js.map +0 -1
- package/dist/migrations/auth-schema.initializer.d.ts +0 -9
- package/dist/migrations/auth-schema.initializer.js +0 -36
- package/dist/migrations/auth-schema.initializer.js.map +0 -1
- package/dist/migrations/auth.migration.v1.d.ts +0 -12
- package/dist/migrations/auth.migration.v1.js +0 -157
- package/dist/migrations/auth.migration.v1.js.map +0 -1
- package/dist/migrations/auth.migration.v2.d.ts +0 -8
- package/dist/migrations/auth.migration.v2.js +0 -39
- package/dist/migrations/auth.migration.v2.js.map +0 -1
- package/dist/migrations/auth.migrations.d.ts +0 -2
- package/dist/migrations/auth.migrations.js +0 -8
- package/dist/migrations/auth.migrations.js.map +0 -1
- package/dist/migrations/migration.runner.d.ts +0 -9
- package/dist/migrations/migration.runner.js +0 -67
- package/dist/migrations/migration.runner.js.map +0 -1
- package/dist/migrations/migration.service.d.ts +0 -9
- package/dist/migrations/migration.service.js +0 -75
- package/dist/migrations/migration.service.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vynelix/nestjs-multi-auth",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "An authentication service/module for NestJs that supports multiple authentication methods such as email, phone, username, OAuth, SSO, etc",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export declare enum AuthStrategy {
|
|
2
|
-
EMAIL = "EMAIL",
|
|
3
|
-
PHONE = "PHONE",
|
|
4
|
-
USERNAME = "USERNAME",
|
|
5
|
-
GOOGLE = "GOOGLE",
|
|
6
|
-
FACEBOOK = "FACEBOOK",
|
|
7
|
-
APPLE = "APPLE",
|
|
8
|
-
/** @deprecated Use granular types instead */
|
|
9
|
-
LOCAL = "LOCAL",
|
|
10
|
-
/** @deprecated Use granular types instead */
|
|
11
|
-
OAUTH = "OAUTH"
|
|
12
|
-
}
|
|
13
|
-
export declare enum OAuthProviderType {
|
|
14
|
-
GOOGLE = "GOOGLE",
|
|
15
|
-
FACEBOOK = "FACEBOOK",
|
|
16
|
-
APPLE = "APPLE"
|
|
17
|
-
}
|
|
18
|
-
export declare enum AuthTransport {
|
|
19
|
-
COOKIE = "cookie",
|
|
20
|
-
BEARER = "bearer",
|
|
21
|
-
BOTH = "both"
|
|
22
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// src/auth/enums/auth-types.enum.ts
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.AuthTransport = exports.OAuthProviderType = exports.AuthStrategy = void 0;
|
|
5
|
-
var AuthStrategy;
|
|
6
|
-
(function (AuthStrategy) {
|
|
7
|
-
// Local / Password-based
|
|
8
|
-
AuthStrategy["EMAIL"] = "EMAIL";
|
|
9
|
-
AuthStrategy["PHONE"] = "PHONE";
|
|
10
|
-
AuthStrategy["USERNAME"] = "USERNAME";
|
|
11
|
-
// Social / OAuth
|
|
12
|
-
AuthStrategy["GOOGLE"] = "GOOGLE";
|
|
13
|
-
AuthStrategy["FACEBOOK"] = "FACEBOOK";
|
|
14
|
-
AuthStrategy["APPLE"] = "APPLE";
|
|
15
|
-
/** @deprecated Use granular types instead */
|
|
16
|
-
AuthStrategy["LOCAL"] = "LOCAL";
|
|
17
|
-
/** @deprecated Use granular types instead */
|
|
18
|
-
AuthStrategy["OAUTH"] = "OAUTH";
|
|
19
|
-
})(AuthStrategy || (exports.AuthStrategy = AuthStrategy = {}));
|
|
20
|
-
var OAuthProviderType;
|
|
21
|
-
(function (OAuthProviderType) {
|
|
22
|
-
OAuthProviderType["GOOGLE"] = "GOOGLE";
|
|
23
|
-
OAuthProviderType["FACEBOOK"] = "FACEBOOK";
|
|
24
|
-
OAuthProviderType["APPLE"] = "APPLE";
|
|
25
|
-
})(OAuthProviderType || (exports.OAuthProviderType = OAuthProviderType = {}));
|
|
26
|
-
var AuthTransport;
|
|
27
|
-
(function (AuthTransport) {
|
|
28
|
-
AuthTransport["COOKIE"] = "cookie";
|
|
29
|
-
AuthTransport["BEARER"] = "bearer";
|
|
30
|
-
AuthTransport["BOTH"] = "both";
|
|
31
|
-
})(AuthTransport || (exports.AuthTransport = AuthTransport = {}));
|
|
32
|
-
//# sourceMappingURL=auth-type.enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-type.enum.js","sourceRoot":"","sources":["../../src/auth/auth-type.enum.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;AAEpC,IAAY,YAeX;AAfD,WAAY,YAAY;IACtB,yBAAyB;IACzB,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,qCAAqB,CAAA;IAErB,iBAAiB;IACjB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IAEf,6CAA6C;IAC7C,+BAAe,CAAA;IACf,6CAA6C;IAC7C,+BAAe,CAAA;AACjB,CAAC,EAfW,YAAY,4BAAZ,YAAY,QAevB;AAED,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,oCAAe,CAAA;AACjB,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAED,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Request } from "express";
|
|
2
|
-
import { AuthModuleOptions, CookieNameConfig } from "../interfaces/auth-module-options.interface";
|
|
3
|
-
export declare class AuthCookieService {
|
|
4
|
-
private options;
|
|
5
|
-
constructor(options: AuthModuleOptions);
|
|
6
|
-
private getNamespace;
|
|
7
|
-
get(req: Request): CookieNameConfig;
|
|
8
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.AuthCookieService = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const auth_module_options_interface_1 = require("../interfaces/auth-module-options.interface");
|
|
18
|
-
let AuthCookieService = class AuthCookieService {
|
|
19
|
-
constructor(options) {
|
|
20
|
-
this.options = options;
|
|
21
|
-
}
|
|
22
|
-
getNamespace(req) {
|
|
23
|
-
const hostname = req.hostname;
|
|
24
|
-
const parts = hostname.split(".");
|
|
25
|
-
if (parts.length <= 2) {
|
|
26
|
-
return "root";
|
|
27
|
-
}
|
|
28
|
-
return parts.slice(0, parts.length - 2).join("_");
|
|
29
|
-
}
|
|
30
|
-
get(req) {
|
|
31
|
-
// 1. USER OVERRIDE (highest priority)
|
|
32
|
-
if (this.options.cookieNameResolver) {
|
|
33
|
-
return this.options.cookieNameResolver(req);
|
|
34
|
-
}
|
|
35
|
-
const namespace = this.getNamespace(req);
|
|
36
|
-
return {
|
|
37
|
-
accessTokenName: `${namespace}_access_token`,
|
|
38
|
-
refreshTokenName: `${namespace}_refresh_token`,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
exports.AuthCookieService = AuthCookieService;
|
|
43
|
-
exports.AuthCookieService = AuthCookieService = __decorate([
|
|
44
|
-
(0, common_1.Injectable)(),
|
|
45
|
-
__param(0, (0, common_1.Inject)(auth_module_options_interface_1.AUTH_MODULE_OPTIONS)),
|
|
46
|
-
__metadata("design:paramtypes", [Object])
|
|
47
|
-
], AuthCookieService);
|
|
48
|
-
//# sourceMappingURL=cookie-namespace.resolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cookie-namespace.resolver.js","sourceRoot":"","sources":["../../../src/auth/core/cookie-namespace.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoD;AAEpD,+FAAuH;AAGhH,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,YACyC,OAA0B;QAA1B,YAAO,GAAP,OAAO,CAAmB;IAC9D,CAAC;IAEE,YAAY,CAAC,GAAY;QAC/B,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC9B,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAElC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACtB,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IAED,GAAG,CAAC,GAAY;QACd,sCAAsC;QACtC,IAAI,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC9C,CAAC;QACD,MAAM,SAAS,GACb,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QAEzB,OAAO;YACL,eAAe,EAAE,GAAG,SAAS,eAAe;YAC5C,gBAAgB,EAAE,GAAG,SAAS,gBAAgB;SAC/C,CAAC;IACJ,CAAC;CACF,CAAA;AA7BY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;IAGN,WAAA,IAAA,eAAM,EAAC,mDAAmB,CAAC,CAAA;;GAFrB,iBAAiB,CA6B7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"current-user-interface.js","sourceRoot":"","sources":["../../src/auth/current-user-interface.ts"],"names":[],"mappings":";AAAA,yDAAyD"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { AuthCredential } from './current-user-interface';
|
|
2
|
-
export declare const CurrentAuth: (...dataOrPipes: (keyof AuthCredential | import("@nestjs/common").PipeTransform<any, any> | import("@nestjs/common").Type<import("@nestjs/common").PipeTransform<any, any>>)[]) => ParameterDecorator;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CurrentAuth = void 0;
|
|
4
|
-
const common_1 = require("@nestjs/common");
|
|
5
|
-
// src/auth/current-user.decorator.ts
|
|
6
|
-
exports.CurrentAuth = (0, common_1.createParamDecorator)((data, ctx) => {
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
8
|
-
const request = ctx.switchToHttp().getRequest();
|
|
9
|
-
const logger = new common_1.Logger('CurrentAuthDecorator');
|
|
10
|
-
// logger.log(`Request keys: ${Object.keys(request)}`)
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
12
|
-
const user = request.user;
|
|
13
|
-
logger.log(`Extracted auth: ${JSON.stringify(user)}`);
|
|
14
|
-
return data ? user?.[data] : user;
|
|
15
|
-
});
|
|
16
|
-
//# sourceMappingURL=current-user.decorator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"current-user.decorator.js","sourceRoot":"","sources":["../../src/auth/current-user.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAgF;AAGhF,qCAAqC;AACxB,QAAA,WAAW,GAAG,IAAA,6BAAoB,EAC7C,CAAC,IAAsC,EAAE,GAAqB,EAAE,EAAE;IAChE,mEAAmE;IACnE,MAAM,OAAO,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;IAEhD,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAsB,CAAC,CAAC;IAClD,sDAAsD;IACtD,sEAAsE;IACtE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAE1B,MAAM,CAAC,GAAG,CAAC,mBAAmB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEtD,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpC,CAAC,CACF,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { AuthStrategy } from '../enums/auth-type.enum';
|
|
2
|
-
import { AuthIdentifierDto } from './identifier-response.dto';
|
|
3
|
-
import { OAuthProviderResponseDto } from './oauth-provider-response.dto';
|
|
4
|
-
export declare class AuthResponseDto {
|
|
5
|
-
id: string;
|
|
6
|
-
uid: string;
|
|
7
|
-
strategy: AuthStrategy;
|
|
8
|
-
isPrimary: boolean;
|
|
9
|
-
isVerified: boolean;
|
|
10
|
-
isActive: boolean;
|
|
11
|
-
meta?: Record<string, any>;
|
|
12
|
-
lastUsedAt?: Date;
|
|
13
|
-
identifiers?: AuthIdentifierDto[];
|
|
14
|
-
oauthProvider?: OAuthProviderResponseDto;
|
|
15
|
-
createdAt: Date;
|
|
16
|
-
updatedAt: Date;
|
|
17
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AuthResponseDto = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const auth_type_enum_1 = require("../enums/auth-type.enum");
|
|
15
|
-
const class_transformer_1 = require("class-transformer");
|
|
16
|
-
const identifier_response_dto_1 = require("./identifier-response.dto");
|
|
17
|
-
const oauth_provider_response_dto_1 = require("./oauth-provider-response.dto");
|
|
18
|
-
class AuthResponseDto {
|
|
19
|
-
}
|
|
20
|
-
exports.AuthResponseDto = AuthResponseDto;
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, class_transformer_1.Expose)(),
|
|
23
|
-
(0, swagger_1.ApiProperty)(),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], AuthResponseDto.prototype, "id", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, class_transformer_1.Expose)(),
|
|
28
|
-
(0, swagger_1.ApiProperty)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], AuthResponseDto.prototype, "uid", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_transformer_1.Expose)(),
|
|
33
|
-
(0, swagger_1.ApiProperty)({ enum: auth_type_enum_1.AuthStrategy }),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], AuthResponseDto.prototype, "strategy", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, class_transformer_1.Expose)(),
|
|
38
|
-
(0, swagger_1.ApiProperty)(),
|
|
39
|
-
__metadata("design:type", Boolean)
|
|
40
|
-
], AuthResponseDto.prototype, "isPrimary", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, class_transformer_1.Expose)(),
|
|
43
|
-
(0, swagger_1.ApiProperty)(),
|
|
44
|
-
__metadata("design:type", Boolean)
|
|
45
|
-
], AuthResponseDto.prototype, "isVerified", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_transformer_1.Expose)(),
|
|
48
|
-
(0, swagger_1.ApiProperty)(),
|
|
49
|
-
__metadata("design:type", Boolean)
|
|
50
|
-
], AuthResponseDto.prototype, "isActive", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, class_transformer_1.Expose)(),
|
|
53
|
-
(0, swagger_1.ApiProperty)({ required: false }),
|
|
54
|
-
__metadata("design:type", Object)
|
|
55
|
-
], AuthResponseDto.prototype, "meta", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, class_transformer_1.Expose)(),
|
|
58
|
-
(0, swagger_1.ApiProperty)({ required: false }),
|
|
59
|
-
__metadata("design:type", Date)
|
|
60
|
-
], AuthResponseDto.prototype, "lastUsedAt", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, class_transformer_1.Expose)(),
|
|
63
|
-
(0, swagger_1.ApiProperty)({ required: false }),
|
|
64
|
-
(0, class_transformer_1.Type)(() => identifier_response_dto_1.AuthIdentifierDto),
|
|
65
|
-
__metadata("design:type", Array)
|
|
66
|
-
], AuthResponseDto.prototype, "identifiers", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, class_transformer_1.Expose)(),
|
|
69
|
-
(0, class_transformer_1.Type)(() => oauth_provider_response_dto_1.OAuthProviderResponseDto),
|
|
70
|
-
(0, swagger_1.ApiProperty)({ type: oauth_provider_response_dto_1.OAuthProviderResponseDto, required: false }),
|
|
71
|
-
__metadata("design:type", oauth_provider_response_dto_1.OAuthProviderResponseDto)
|
|
72
|
-
], AuthResponseDto.prototype, "oauthProvider", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, class_transformer_1.Expose)(),
|
|
75
|
-
(0, swagger_1.ApiProperty)(),
|
|
76
|
-
__metadata("design:type", Date)
|
|
77
|
-
], AuthResponseDto.prototype, "createdAt", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, class_transformer_1.Expose)(),
|
|
80
|
-
(0, swagger_1.ApiProperty)(),
|
|
81
|
-
__metadata("design:type", Date)
|
|
82
|
-
], AuthResponseDto.prototype, "updatedAt", void 0);
|
|
83
|
-
//# sourceMappingURL=auth-response.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-response.dto.js","sourceRoot":"","sources":["../../../src/auth/dto/auth-response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,4DAAuD;AACvD,yDAAiD;AACjD,uEAA8D;AAC9D,+EAAyE;AAEzE,MAAa,eAAe;CAkD3B;AAlDD,0CAkDC;AA/CG;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;2CACH;AAIX;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;4CACF;AAIZ;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,6BAAY,EAAE,CAAC;;iDACb;AAIvB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;kDACK;AAInB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;mDACM;AAIpB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;iDACI;AAIlB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6CACN;AAI3B;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BACpB,IAAI;mDAAC;AAKlB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAChC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,2CAAiB,CAAC;;oDACI;AAKlC;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,sDAAwB,CAAC;IACpC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,sDAAwB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BACjD,sDAAwB;sDAAC;AAIzC;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,GAAE;8BACH,IAAI;kDAAC;AAIhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,GAAE;8BACH,IAAI;kDAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AuthIdentifierDto = void 0;
|
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
|
14
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
-
class AuthIdentifierDto {
|
|
16
|
-
}
|
|
17
|
-
exports.AuthIdentifierDto = AuthIdentifierDto;
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, class_transformer_1.Expose)(),
|
|
20
|
-
(0, swagger_1.ApiProperty)(),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], AuthIdentifierDto.prototype, "id", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, class_transformer_1.Expose)(),
|
|
25
|
-
(0, swagger_1.ApiProperty)(),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], AuthIdentifierDto.prototype, "type", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, class_transformer_1.Expose)(),
|
|
30
|
-
(0, swagger_1.ApiProperty)(),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], AuthIdentifierDto.prototype, "value", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, class_transformer_1.Expose)(),
|
|
35
|
-
(0, swagger_1.ApiProperty)(),
|
|
36
|
-
__metadata("design:type", Boolean)
|
|
37
|
-
], AuthIdentifierDto.prototype, "isVerified", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, class_transformer_1.Expose)(),
|
|
40
|
-
__metadata("design:type", Date)
|
|
41
|
-
], AuthIdentifierDto.prototype, "createdAt", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, class_transformer_1.Expose)(),
|
|
44
|
-
__metadata("design:type", Date)
|
|
45
|
-
], AuthIdentifierDto.prototype, "updatedAt", void 0);
|
|
46
|
-
//# sourceMappingURL=identifier-response.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"identifier-response.dto.js","sourceRoot":"","sources":["../../../src/auth/dto/identifier-response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,6CAA8C;AAE9C,MAAa,iBAAiB;CAsB7B;AAtBD,8CAsBC;AAnBC;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;6CACH;AAIX;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;+CACD;AAIb;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;gDACA;AAId;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;qDACM;AAGpB;IADC,IAAA,0BAAM,GAAE;8BACE,IAAI;oDAAC;AAGhB;IADC,IAAA,0BAAM,GAAE;8BACE,IAAI;oDAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AuthStrategy, OAuthProviderType } from '../enums/auth-type.enum';
|
|
2
|
-
export declare class LoginDto {
|
|
3
|
-
method: AuthStrategy;
|
|
4
|
-
provider?: OAuthProviderType;
|
|
5
|
-
emailOrPhone?: string;
|
|
6
|
-
email?: string;
|
|
7
|
-
phone?: string;
|
|
8
|
-
username?: string;
|
|
9
|
-
password?: string;
|
|
10
|
-
token?: string;
|
|
11
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.LoginDto = void 0;
|
|
13
|
-
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
14
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
-
const class_validator_1 = require("class-validator");
|
|
16
|
-
const auth_type_enum_1 = require("../enums/auth-type.enum");
|
|
17
|
-
class LoginDto {
|
|
18
|
-
}
|
|
19
|
-
exports.LoginDto = LoginDto;
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, swagger_1.ApiProperty)({
|
|
22
|
-
enum: auth_type_enum_1.AuthStrategy,
|
|
23
|
-
example: auth_type_enum_1.AuthStrategy.LOCAL,
|
|
24
|
-
description: 'Authentication method chosen by the user',
|
|
25
|
-
type: () => auth_type_enum_1.AuthStrategy,
|
|
26
|
-
}),
|
|
27
|
-
(0, class_validator_1.IsEnum)(auth_type_enum_1.AuthStrategy),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], LoginDto.prototype, "method", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, swagger_1.ApiProperty)({
|
|
32
|
-
enum: auth_type_enum_1.OAuthProviderType,
|
|
33
|
-
example: auth_type_enum_1.OAuthProviderType.GOOGLE,
|
|
34
|
-
description: 'OAuth provider (required if method is OAUTH)',
|
|
35
|
-
required: false,
|
|
36
|
-
}),
|
|
37
|
-
(0, class_validator_1.IsEnum)(auth_type_enum_1.OAuthProviderType),
|
|
38
|
-
(0, class_validator_1.IsOptional)(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], LoginDto.prototype, "provider", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, class_validator_1.IsOptional)(),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], LoginDto.prototype, "emailOrPhone", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, swagger_1.ApiProperty)({ example: 'john@example.com', required: false }),
|
|
47
|
-
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
__metadata("design:type", String)
|
|
49
|
-
], LoginDto.prototype, "email", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, swagger_1.ApiProperty)({ example: '+2347035742844', required: false }),
|
|
52
|
-
(0, class_validator_1.IsOptional)(),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], LoginDto.prototype, "phone", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, swagger_1.ApiProperty)({ example: 'john_doe', required: false }),
|
|
57
|
-
(0, class_validator_1.IsOptional)(),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], LoginDto.prototype, "username", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, class_validator_1.IsOptional)(),
|
|
62
|
-
__metadata("design:type", String)
|
|
63
|
-
], LoginDto.prototype, "password", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, class_validator_1.IsOptional)(),
|
|
66
|
-
__metadata("design:type", String)
|
|
67
|
-
], LoginDto.prototype, "token", void 0);
|
|
68
|
-
//# sourceMappingURL=login.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"login.dto.js","sourceRoot":"","sources":["../../../src/auth/dto/login.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAsD;AACtD,6CAA8C;AAC9C,qDAAqD;AACrD,4DAA0E;AAE1E,MAAa,QAAQ;CA0CpB;AA1CD,4BA0CC;AAlCC;IAPC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,6BAAY;QAClB,OAAO,EAAE,6BAAY,CAAC,KAAK;QAC3B,WAAW,EAAE,0CAA0C;QACvD,IAAI,EAAE,GAAG,EAAE,CAAC,6BAAY;KACzB,CAAC;IACD,IAAA,wBAAM,EAAC,6BAAY,CAAC;;wCACA;AAUrB;IARC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,kCAAiB;QACvB,OAAO,EAAE,kCAAiB,CAAC,MAAM;QACjC,WAAW,EAAE,8CAA8C;QAC3D,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,wBAAM,EAAC,kCAAiB,CAAC;IACzB,IAAA,4BAAU,GAAE;;0CACgB;AAI7B;IADC,IAAA,4BAAU,GAAE;;8CACS;AAItB;IAFC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7D,IAAA,4BAAU,GAAE;;uCACE;AAIf;IAFC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC3D,IAAA,4BAAU,GAAE;;uCACE;AAIf;IAFC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACrD,IAAA,4BAAU,GAAE;;0CACK;AAGlB;IADC,IAAA,4BAAU,GAAE;;0CACK;AAIlB;IADC,IAAA,4BAAU,GAAE;;uCACE"}
|
package/dist/auth/dto/mfa.dto.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ActivateMfaDto = exports.EnrollMfaDto = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
-
const mfa_method_entity_1 = require("../entities/mfa-method.entity");
|
|
16
|
-
class EnrollMfaDto {
|
|
17
|
-
}
|
|
18
|
-
exports.EnrollMfaDto = EnrollMfaDto;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, swagger_1.ApiProperty)({
|
|
21
|
-
description: 'The type of MFA to enroll (e.g., TOTP)',
|
|
22
|
-
enum: mfa_method_entity_1.MfaType,
|
|
23
|
-
example: mfa_method_entity_1.MfaType.TOTP,
|
|
24
|
-
}),
|
|
25
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
-
(0, class_validator_1.IsEnum)(mfa_method_entity_1.MfaType),
|
|
27
|
-
__metadata("design:type", String)
|
|
28
|
-
], EnrollMfaDto.prototype, "type", void 0);
|
|
29
|
-
class ActivateMfaDto {
|
|
30
|
-
}
|
|
31
|
-
exports.ActivateMfaDto = ActivateMfaDto;
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, swagger_1.ApiProperty)({
|
|
34
|
-
description: 'The type of MFA to activate',
|
|
35
|
-
enum: mfa_method_entity_1.MfaType,
|
|
36
|
-
example: mfa_method_entity_1.MfaType.TOTP,
|
|
37
|
-
}),
|
|
38
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
39
|
-
(0, class_validator_1.IsEnum)(mfa_method_entity_1.MfaType),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], ActivateMfaDto.prototype, "type", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, swagger_1.ApiProperty)({
|
|
44
|
-
description: 'The verification code from the MFA app',
|
|
45
|
-
example: '123456',
|
|
46
|
-
}),
|
|
47
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
48
|
-
(0, class_validator_1.IsString)(),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], ActivateMfaDto.prototype, "code", void 0);
|
|
51
|
-
//# sourceMappingURL=mfa.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mfa.dto.js","sourceRoot":"","sources":["../../../src/auth/dto/mfa.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,6CAA8C;AAC9C,qEAAwD;AAExD,MAAa,YAAY;CASxB;AATD,oCASC;AADG;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,wCAAwC;QACrD,IAAI,EAAE,2BAAO;QACb,OAAO,EAAE,2BAAO,CAAC,IAAI;KACxB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,2BAAO,CAAC;;0CACF;AAGlB,MAAa,cAAc;CAiB1B;AAjBD,wCAiBC;AATG;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,6BAA6B;QAC1C,IAAI,EAAE,2BAAO;QACb,OAAO,EAAE,2BAAO,CAAC,IAAI;KACxB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,2BAAO,CAAC;;4CACF;AAQd;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,QAAQ;KACpB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4CACE"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.OAuthProviderResponseDto = void 0;
|
|
13
|
-
// oauth-provider-response.dto.ts
|
|
14
|
-
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
16
|
-
const auth_type_enum_1 = require("../enums/auth-type.enum");
|
|
17
|
-
class OAuthProviderResponseDto {
|
|
18
|
-
}
|
|
19
|
-
exports.OAuthProviderResponseDto = OAuthProviderResponseDto;
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, class_transformer_1.Expose)(),
|
|
22
|
-
(0, swagger_1.ApiProperty)({ enum: auth_type_enum_1.OAuthProviderType }),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], OAuthProviderResponseDto.prototype, "provider", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, class_transformer_1.Expose)(),
|
|
27
|
-
(0, swagger_1.ApiProperty)(),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], OAuthProviderResponseDto.prototype, "providerUserId", void 0);
|
|
30
|
-
//# sourceMappingURL=oauth-provider-response.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-provider-response.dto.js","sourceRoot":"","sources":["../../../src/auth/dto/oauth-provider-response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAAiC;AACjC,yDAA2C;AAC3C,6CAA8C;AAC9C,4DAA4D;AAE5D,MAAa,wBAAwB;CAQpC;AARD,4DAQC;AALC;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,kCAAiB,EAAE,CAAC;;0DACb;AAI5B;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;gEACS"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.RefreshTokenDto = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
class RefreshTokenDto {
|
|
16
|
-
}
|
|
17
|
-
exports.RefreshTokenDto = RefreshTokenDto;
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, swagger_1.ApiProperty)({
|
|
20
|
-
example: 'eyJhbGciOiJIUzI1NiIsInR5c...',
|
|
21
|
-
description: 'The refresh token (required if not using cookies)',
|
|
22
|
-
required: false,
|
|
23
|
-
}),
|
|
24
|
-
(0, class_validator_1.IsString)(),
|
|
25
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], RefreshTokenDto.prototype, "refreshToken", void 0);
|
|
28
|
-
//# sourceMappingURL=refresh-token.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-token.dto.js","sourceRoot":"","sources":["../../../src/auth/dto/refresh-token.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAAuD;AAEvD,MAAa,eAAe;CAS3B;AATD,0CASC;AADG;IAPC,IAAA,qBAAW,EAAC;QACT,OAAO,EAAE,8BAA8B;QACvC,WAAW,EAAE,mDAAmD;QAChE,QAAQ,EAAE,KAAK;KAClB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACS"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AuthStrategy, OAuthProviderType } from '../enums/auth-type.enum';
|
|
2
|
-
export declare class SignupDto {
|
|
3
|
-
method: AuthStrategy;
|
|
4
|
-
provider?: OAuthProviderType;
|
|
5
|
-
phone?: string;
|
|
6
|
-
username?: string;
|
|
7
|
-
email?: string;
|
|
8
|
-
password?: string;
|
|
9
|
-
/**
|
|
10
|
-
* For OAuth / OTP verification
|
|
11
|
-
*/
|
|
12
|
-
token?: string;
|
|
13
|
-
}
|