@flusys/nestjs-auth 7.0.2 → 8.0.0-beta.1
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/README.md +68 -1
- package/config/auth.constants.d.ts +2 -0
- package/config/event-actions.d.ts +2 -0
- package/config/index.d.ts +3 -3
- package/config/message-keys.d.ts +23 -0
- package/controllers/authentication.controller.d.ts +5 -5
- package/controllers/branch.controller.d.ts +2 -2
- package/controllers/company-selection.controller.d.ts +4 -4
- package/controllers/company.controller.d.ts +2 -2
- package/controllers/email-verification.controller.d.ts +6 -6
- package/controllers/index.d.ts +9 -7
- package/controllers/social-auth-config.controller.d.ts +22 -0
- package/controllers/social-auth.controller.d.ts +11 -0
- package/controllers/user-permission.controller.d.ts +5 -4
- package/controllers/user.controller.d.ts +7 -7
- package/docs/auth-swagger.config.d.ts +2 -2
- package/docs/index.d.ts +1 -1
- package/dtos/index.d.ts +6 -5
- package/dtos/social-auth.dto.d.ts +42 -0
- package/entities/company-branch.entity.d.ts +1 -1
- package/entities/company.entity.d.ts +1 -1
- package/entities/index.d.ts +15 -13
- package/entities/pending-registration.entity.d.ts +1 -1
- package/entities/social-auth-config.entity.d.ts +9 -0
- package/entities/user-company-permission.entity.d.ts +4 -4
- package/enums/index.d.ts +2 -1
- package/enums/social-provider-type.enum.d.ts +6 -0
- package/fesm/118.js +1230 -0
- package/fesm/120.js +2197 -0
- package/fesm/24.js +4389 -0
- package/fesm/370.js +1163 -0
- package/fesm/446.js +877 -0
- package/fesm/chunks/117.js +69 -0
- package/fesm/config/index.js +244 -3
- package/fesm/controllers/index.js +27 -7
- package/fesm/docs/index.js +479 -1
- package/fesm/dtos/index.js +123 -5
- package/fesm/entities/index.js +68 -19
- package/fesm/enums/index.js +53 -1
- package/fesm/helpers/index.js +115 -2
- package/fesm/index.js +1437 -12
- package/fesm/interceptors/index.js +508 -2
- package/fesm/interfaces/index.js +75 -7
- package/fesm/modules/index.js +546 -1
- package/fesm/runtime.js +134 -0
- package/fesm/services/index.js +67 -9
- package/helpers/auth-response.mapper.d.ts +3 -3
- package/helpers/index.d.ts +2 -2
- package/helpers/token.helper.d.ts +2 -2
- package/index.d.ts +13 -12
- package/interceptors/clear-token.interceptor.d.ts +2 -2
- package/interceptors/index.d.ts +2 -2
- package/interceptors/set-token.interceptor.d.ts +2 -2
- package/interfaces/auth-module-options.interface.d.ts +3 -3
- package/interfaces/authentication.interface.d.ts +3 -3
- package/interfaces/company-branch.interface.d.ts +2 -2
- package/interfaces/company.interface.d.ts +1 -1
- package/interfaces/index.d.ts +8 -7
- package/interfaces/social-auth.interface.d.ts +43 -0
- package/interfaces/user-enricher.interface.d.ts +3 -3
- package/modules/auth.module.d.ts +4 -4
- package/modules/index.d.ts +1 -1
- package/package.json +32 -39
- package/providers/facebook.social-provider.d.ts +10 -0
- package/providers/google.social-provider.d.ts +10 -0
- package/providers/index.d.ts +1 -0
- package/providers/linkedin.social-provider.d.ts +10 -0
- package/providers/microsoft.social-provider.d.ts +10 -0
- package/providers/oauth-http.util.d.ts +10 -0
- package/providers/social-provider.registry.d.ts +3 -0
- package/services/auth-config.service.d.ts +4 -3
- package/services/auth-datasource.provider.d.ts +4 -3
- package/services/auth-email.service.d.ts +3 -3
- package/services/authentication.service.d.ts +15 -11
- package/services/branch.service.d.ts +7 -7
- package/services/company.service.d.ts +6 -6
- package/services/index.d.ts +11 -9
- package/services/social-auth-config.service.d.ts +21 -0
- package/services/social-auth.service.d.ts +24 -0
- package/services/user-permission.service.d.ts +8 -4
- package/services/user.service.d.ts +7 -7
- package/strategies/jwt.strategy.d.ts +4 -4
- package/validators/password.validator.d.ts +1 -1
- package/cjs/config/auth.constants.js +0 -41
- package/cjs/config/event-actions.js +0 -45
- package/cjs/config/index.js +0 -20
- package/cjs/config/message-keys.js +0 -108
- package/cjs/controllers/authentication.controller.js +0 -427
- package/cjs/controllers/authentication.controller.spec.js +0 -219
- package/cjs/controllers/branch.controller.js +0 -102
- package/cjs/controllers/branch.controller.spec.js +0 -134
- package/cjs/controllers/company-selection.controller.js +0 -198
- package/cjs/controllers/company-selection.controller.spec.js +0 -84
- package/cjs/controllers/company.controller.js +0 -102
- package/cjs/controllers/company.controller.spec.js +0 -131
- package/cjs/controllers/email-verification.controller.js +0 -224
- package/cjs/controllers/email-verification.controller.spec.js +0 -142
- package/cjs/controllers/index.js +0 -24
- package/cjs/controllers/user-permission.controller.js +0 -223
- package/cjs/controllers/user-permission.controller.spec.js +0 -138
- package/cjs/controllers/user.controller.js +0 -438
- package/cjs/controllers/user.controller.spec.js +0 -204
- package/cjs/docs/auth-swagger.config.js +0 -453
- package/cjs/docs/auth-swagger.config.spec.js +0 -130
- package/cjs/docs/index.js +0 -18
- package/cjs/dtos/authentication.dto.js +0 -755
- package/cjs/dtos/company-branch.dto.js +0 -294
- package/cjs/dtos/company.dto.js +0 -298
- package/cjs/dtos/index.js +0 -22
- package/cjs/dtos/user-permission.dto.js +0 -358
- package/cjs/dtos/user.dto.js +0 -413
- package/cjs/entities/app-user.entity.js +0 -25
- package/cjs/entities/company-branch.entity.js +0 -163
- package/cjs/entities/company.entity.js +0 -146
- package/cjs/entities/index.js +0 -65
- package/cjs/entities/index.spec.js +0 -73
- package/cjs/entities/pending-registration.entity.js +0 -135
- package/cjs/entities/user-company-permission.entity.js +0 -153
- package/cjs/entities/user-token.entity.js +0 -120
- package/cjs/enums/index.js +0 -18
- package/cjs/enums/user-org-permission-type.enum.js +0 -15
- package/cjs/helpers/auth-response.mapper.js +0 -46
- package/cjs/helpers/auth-response.mapper.spec.js +0 -139
- package/cjs/helpers/index.js +0 -19
- package/cjs/helpers/token.helper.js +0 -58
- package/cjs/helpers/token.helper.spec.js +0 -86
- package/cjs/index.js +0 -29
- package/cjs/interceptors/clear-token.interceptor.js +0 -73
- package/cjs/interceptors/clear-token.interceptor.spec.js +0 -107
- package/cjs/interceptors/index.js +0 -19
- package/cjs/interceptors/set-token.interceptor.js +0 -107
- package/cjs/interceptors/set-token.interceptor.spec.js +0 -165
- package/cjs/interfaces/auth-email-provider.interface.js +0 -45
- package/cjs/interfaces/auth-module-options.interface.js +0 -4
- package/cjs/interfaces/authentication.interface.js +0 -4
- package/cjs/interfaces/company-branch.interface.js +0 -4
- package/cjs/interfaces/company.interface.js +0 -4
- package/cjs/interfaces/index.js +0 -24
- package/cjs/interfaces/user-enricher.interface.js +0 -4
- package/cjs/interfaces/user.interface.js +0 -4
- package/cjs/modules/auth.module.js +0 -202
- package/cjs/modules/auth.module.spec.js +0 -243
- package/cjs/modules/index.js +0 -18
- package/cjs/services/auth-config.service.js +0 -110
- package/cjs/services/auth-config.service.spec.js +0 -97
- package/cjs/services/auth-datasource.provider.js +0 -134
- package/cjs/services/auth-datasource.provider.spec.js +0 -161
- package/cjs/services/auth-email.service.js +0 -539
- package/cjs/services/auth-email.service.spec.js +0 -456
- package/cjs/services/authentication.service.js +0 -1173
- package/cjs/services/authentication.service.spec.js +0 -962
- package/cjs/services/branch.service.js +0 -153
- package/cjs/services/branch.service.spec.js +0 -169
- package/cjs/services/company-selection-session.service.js +0 -121
- package/cjs/services/company-selection-session.service.spec.js +0 -90
- package/cjs/services/company.service.js +0 -140
- package/cjs/services/company.service.spec.js +0 -127
- package/cjs/services/index.js +0 -26
- package/cjs/services/user-permission.service.js +0 -236
- package/cjs/services/user-permission.service.spec.js +0 -254
- package/cjs/services/user.service.js +0 -671
- package/cjs/services/user.service.spec.js +0 -718
- package/cjs/strategies/jwt.strategy.js +0 -140
- package/cjs/strategies/jwt.strategy.spec.js +0 -166
- package/cjs/validators/password.validator.js +0 -45
- package/cjs/validators/password.validator.spec.js +0 -161
- package/fesm/config/auth.constants.js +0 -11
- package/fesm/config/event-actions.js +0 -24
- package/fesm/config/message-keys.js +0 -78
- package/fesm/controllers/authentication.controller.js +0 -417
- package/fesm/controllers/authentication.controller.spec.js +0 -215
- package/fesm/controllers/branch.controller.js +0 -92
- package/fesm/controllers/branch.controller.spec.js +0 -130
- package/fesm/controllers/company-selection.controller.js +0 -188
- package/fesm/controllers/company-selection.controller.spec.js +0 -80
- package/fesm/controllers/company.controller.js +0 -92
- package/fesm/controllers/company.controller.spec.js +0 -127
- package/fesm/controllers/email-verification.controller.js +0 -214
- package/fesm/controllers/email-verification.controller.spec.js +0 -138
- package/fesm/controllers/user-permission.controller.js +0 -213
- package/fesm/controllers/user-permission.controller.spec.js +0 -134
- package/fesm/controllers/user.controller.js +0 -428
- package/fesm/controllers/user.controller.spec.js +0 -200
- package/fesm/docs/auth-swagger.config.js +0 -446
- package/fesm/docs/auth-swagger.config.spec.js +0 -126
- package/fesm/dtos/authentication.dto.js +0 -683
- package/fesm/dtos/company-branch.dto.js +0 -279
- package/fesm/dtos/company.dto.js +0 -283
- package/fesm/dtos/user-permission.dto.js +0 -339
- package/fesm/dtos/user.dto.js +0 -391
- package/fesm/entities/app-user.entity.js +0 -15
- package/fesm/entities/company-branch.entity.js +0 -153
- package/fesm/entities/company.entity.js +0 -136
- package/fesm/entities/index.spec.js +0 -69
- package/fesm/entities/pending-registration.entity.js +0 -125
- package/fesm/entities/user-company-permission.entity.js +0 -136
- package/fesm/entities/user-token.entity.js +0 -104
- package/fesm/enums/user-org-permission-type.enum.js +0 -5
- package/fesm/helpers/auth-response.mapper.js +0 -25
- package/fesm/helpers/auth-response.mapper.spec.js +0 -135
- package/fesm/helpers/token.helper.js +0 -40
- package/fesm/helpers/token.helper.spec.js +0 -82
- package/fesm/interceptors/clear-token.interceptor.js +0 -63
- package/fesm/interceptors/clear-token.interceptor.spec.js +0 -103
- package/fesm/interceptors/set-token.interceptor.js +0 -98
- package/fesm/interceptors/set-token.interceptor.spec.js +0 -161
- package/fesm/interfaces/auth-email-provider.interface.js +0 -38
- package/fesm/interfaces/auth-module-options.interface.js +0 -3
- package/fesm/interfaces/authentication.interface.js +0 -1
- package/fesm/interfaces/company-branch.interface.js +0 -1
- package/fesm/interfaces/company.interface.js +0 -1
- package/fesm/interfaces/user-enricher.interface.js +0 -4
- package/fesm/interfaces/user.interface.js +0 -1
- package/fesm/modules/auth.module.js +0 -192
- package/fesm/modules/auth.module.spec.js +0 -239
- package/fesm/services/auth-config.service.js +0 -100
- package/fesm/services/auth-config.service.spec.js +0 -93
- package/fesm/services/auth-datasource.provider.js +0 -83
- package/fesm/services/auth-datasource.provider.spec.js +0 -157
- package/fesm/services/auth-email.service.js +0 -488
- package/fesm/services/auth-email.service.spec.js +0 -411
- package/fesm/services/authentication.service.js +0 -1122
- package/fesm/services/authentication.service.spec.js +0 -917
- package/fesm/services/branch.service.js +0 -143
- package/fesm/services/branch.service.spec.js +0 -165
- package/fesm/services/company-selection-session.service.js +0 -111
- package/fesm/services/company-selection-session.service.spec.js +0 -86
- package/fesm/services/company.service.js +0 -130
- package/fesm/services/company.service.spec.js +0 -123
- package/fesm/services/user-permission.service.js +0 -226
- package/fesm/services/user-permission.service.spec.js +0 -250
- package/fesm/services/user.service.js +0 -620
- package/fesm/services/user.service.spec.js +0 -673
- package/fesm/strategies/jwt.strategy.js +0 -130
- package/fesm/strategies/jwt.strategy.spec.js +0 -162
- package/fesm/validators/password.validator.js +0 -48
- package/fesm/validators/password.validator.spec.js +0 -157
|
@@ -1,2 +1,508 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as __rspack_external__flusys_nestjs_shared_constants_81f33d5b from "@flusys/nestjs-shared/constants";
|
|
2
|
+
import * as __rspack_external__flusys_nestjs_shared_utils_9125c1f1 from "@flusys/nestjs-shared/utils";
|
|
3
|
+
import * as __rspack_external__nestjs_common_a04939da from "@nestjs/common";
|
|
4
|
+
import * as __rspack_external_rxjs from "rxjs";
|
|
5
|
+
import * as __rspack_external__flusys_nestjs_core_config_197fa0a9 from "@flusys/nestjs-core/config";
|
|
6
|
+
import * as __rspack_external_buffer from "buffer";
|
|
7
|
+
export const __rspack_esm_id = 971;
|
|
8
|
+
export const __rspack_esm_ids = [971];
|
|
9
|
+
export const __webpack_modules__ = {
|
|
10
|
+
5588(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
11
|
+
// Injection Tokens
|
|
12
|
+
const AUTH_MODULE_OPTIONS = 'AUTH_MODULE_OPTIONS';
|
|
13
|
+
const USER_ENRICHER = 'USER_ENRICHER';
|
|
14
|
+
// Security
|
|
15
|
+
const BCRYPT_SALT_ROUNDS = 12;
|
|
16
|
+
// Cookie
|
|
17
|
+
const DEFAULT_COOKIE_NAME = 'fsn_refresh_token';
|
|
18
|
+
const MAX_COOKIE_BYTES = 3500;
|
|
19
|
+
// Cache Key Prefixes
|
|
20
|
+
const SESSION_CACHE_PREFIX = 'auth:session';
|
|
21
|
+
const TOKEN_REVOKED_PREFIX = 'auth:revoked';
|
|
22
|
+
const SOCIAL_STATE_PREFIX = 'auth:social:state';
|
|
23
|
+
// Social Login
|
|
24
|
+
const SOCIAL_STATE_TTL_MS = 10 * 60 * 1000; // 10 minutes
|
|
25
|
+
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
}, {
|
|
28
|
+
EV: TOKEN_REVOKED_PREFIX,
|
|
29
|
+
PR: SOCIAL_STATE_PREFIX,
|
|
30
|
+
Vl: SESSION_CACHE_PREFIX,
|
|
31
|
+
jt: USER_ENRICHER,
|
|
32
|
+
rv: DEFAULT_COOKIE_NAME,
|
|
33
|
+
xe: AUTH_MODULE_OPTIONS
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
5363(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
39
|
+
// ==================== AUTH MODULE MESSAGE KEYS ====================
|
|
40
|
+
const AUTH_MESSAGES = {
|
|
41
|
+
LOGIN_SUCCESS: 'auth.login.success',
|
|
42
|
+
LOGIN_REQUIRES_SELECTION: 'auth.login.requires.selection',
|
|
43
|
+
LOGIN_INVALID_CREDENTIALS: 'auth.login.invalid.credentials',
|
|
44
|
+
LOGIN_EMAIL_NOT_VERIFIED: 'auth.login.email.not.verified',
|
|
45
|
+
LOGIN_ACCOUNT_DEACTIVATED: 'auth.login.account.deactivated',
|
|
46
|
+
LOGOUT_SUCCESS: 'auth.logout.success',
|
|
47
|
+
REGISTER_SUCCESS: 'auth.register.success',
|
|
48
|
+
REGISTER_FAILED: 'auth.register.failed',
|
|
49
|
+
REFRESH_SUCCESS: 'auth.refresh.success',
|
|
50
|
+
ME_SUCCESS: 'auth.me.success',
|
|
51
|
+
SELECT_SUCCESS: 'auth.select.success',
|
|
52
|
+
SWITCH_COMPANY_SUCCESS: 'auth.switch.company.success',
|
|
53
|
+
REGISTER_EMAIL_EXISTS: 'auth.register.email.exists',
|
|
54
|
+
REGISTER_ACCOUNT_DELETED: 'auth.register.account.deleted',
|
|
55
|
+
REGISTER_COMPANY_ALREADY_ASSIGNED: 'auth.register.company.already.assigned',
|
|
56
|
+
REGISTER_SIGNUP_DISABLED: 'auth.register.signup.disabled',
|
|
57
|
+
PASSWORD_CHANGE_SUCCESS: 'auth.password.change.success',
|
|
58
|
+
PASSWORD_CHANGE_INVALID_CURRENT: 'auth.password.change.invalid.current',
|
|
59
|
+
PASSWORD_CHANGE_CURRENT_REQUIRED: 'auth.password.change.current.required',
|
|
60
|
+
PASSWORD_RESET_EMAIL_SENT: 'auth.password.reset.email.sent',
|
|
61
|
+
PASSWORD_RESET_SUCCESS: 'auth.password.reset.success',
|
|
62
|
+
TOKEN_REQUIRED: 'auth.token.required',
|
|
63
|
+
TOKEN_INVALID: 'auth.token.invalid',
|
|
64
|
+
TOKEN_EXPIRED: 'auth.token.expired',
|
|
65
|
+
TOKEN_REVOKED: 'auth.token.revoked',
|
|
66
|
+
TOKEN_TOO_LARGE: 'auth.token.too.large',
|
|
67
|
+
COMPANY_LIST_SUCCESS: 'auth.company.list.success',
|
|
68
|
+
COMPANY_NO_ACCESS: 'auth.company.no.access',
|
|
69
|
+
COMPANY_NOT_FOUND: 'auth.company.not.found',
|
|
70
|
+
COMPANY_REQUIRED: 'auth.company.required',
|
|
71
|
+
COMPANY_FEATURE_NOT_ENABLED: 'auth.company.feature.not.enabled',
|
|
72
|
+
BRANCH_LIST_SUCCESS: 'auth.branch.list.success',
|
|
73
|
+
BRANCH_NO_ACCESS: 'auth.branch.no.access',
|
|
74
|
+
BRANCH_NOT_FOUND: 'auth.branch.not.found',
|
|
75
|
+
EMAIL_NOT_CONFIGURED: 'auth.email.not.configured',
|
|
76
|
+
EMAIL_SEND_FAILED: 'auth.email.send.failed',
|
|
77
|
+
SESSION_INVALID: 'auth.session.invalid',
|
|
78
|
+
SESSION_NOT_AVAILABLE: 'auth.session.not.available',
|
|
79
|
+
PROFILE_ACCESS_DENIED: 'auth.profile.access.denied',
|
|
80
|
+
PROFILE_SECTIONS_NOT_SUPPORTED: 'auth.profile.sections.not.supported',
|
|
81
|
+
LOGOUT_SERVICE_UNAVAILABLE: 'auth.logout.service.unavailable',
|
|
82
|
+
PASSWORD_RESET_TOKEN_EXPIRED: 'auth.password.reset.token.expired',
|
|
83
|
+
PASSWORD_RESET_TOKEN_USED: 'auth.password.reset.token.used'
|
|
84
|
+
};
|
|
85
|
+
const EMAIL_VERIFICATION_MESSAGES = {
|
|
86
|
+
VERIFICATION_SENT: 'email.verification.sent',
|
|
87
|
+
VERIFICATION_SUCCESS: 'email.verification.success',
|
|
88
|
+
VERIFICATION_TOKEN_INVALID: 'email.verification.token.invalid',
|
|
89
|
+
VERIFICATION_TOKEN_EXPIRED: 'email.verification.token.expired',
|
|
90
|
+
VERIFICATION_NOT_ENABLED: 'email.verification.not.enabled',
|
|
91
|
+
RESEND_SUCCESS: 'email.verification.resend.success'
|
|
92
|
+
};
|
|
93
|
+
const SOCIAL_AUTH_MESSAGES = {
|
|
94
|
+
PROVIDERS_SUCCESS: 'auth.social.providers.success',
|
|
95
|
+
AUTHORIZE_SUCCESS: 'auth.social.authorize.success',
|
|
96
|
+
LOGIN_SUCCESS: 'auth.social.login.success',
|
|
97
|
+
PROVIDER_DISABLED: 'auth.social.provider.disabled',
|
|
98
|
+
PROVIDER_NOT_CONFIGURED: 'auth.social.provider.not.configured',
|
|
99
|
+
STATE_INVALID: 'auth.social.state.invalid',
|
|
100
|
+
REDIRECT_URI_MISMATCH: 'auth.social.redirect.uri.mismatch',
|
|
101
|
+
EXCHANGE_FAILED: 'auth.social.exchange.failed',
|
|
102
|
+
PROFILE_INCOMPLETE: 'auth.social.profile.incomplete',
|
|
103
|
+
ACCOUNT_NOT_LINKED: 'auth.social.account.not.linked',
|
|
104
|
+
COMPANY_REQUIRED: 'auth.social.company.required',
|
|
105
|
+
EMAIL_REQUIRED: 'auth.social.email.required',
|
|
106
|
+
EMAIL_NOT_VERIFIED: 'auth.social.email.not.verified',
|
|
107
|
+
ACCOUNT_DELETED: 'auth.social.account.deleted'
|
|
108
|
+
};
|
|
109
|
+
const SOCIAL_AUTH_CONFIG_MESSAGES = {
|
|
110
|
+
PROVIDER_ALREADY_CONFIGURED: 'social.config.provider.already.configured'
|
|
111
|
+
};
|
|
112
|
+
const USER_MESSAGES = {
|
|
113
|
+
NOT_FOUND: 'user.not.found',
|
|
114
|
+
PROFILE_UPDATE_SUCCESS: 'user.profile.update.success',
|
|
115
|
+
PROFILE_EXTRAS_SUCCESS: 'user.profile.extras.success',
|
|
116
|
+
PROFILE_SECTIONS_SUCCESS: 'user.profile.sections.success',
|
|
117
|
+
PROFILE_SECTION_DATA_SUCCESS: 'user.profile.section.data.success',
|
|
118
|
+
PROFILE_SECTION_UPDATE_SUCCESS: 'user.profile.section.update.success',
|
|
119
|
+
PROFILE_COMPLETION_SUCCESS: 'user.profile.completion.success',
|
|
120
|
+
EMAIL_VERIFY_SUCCESS: 'user.email.verify.success',
|
|
121
|
+
PHONE_VERIFY_SUCCESS: 'user.phone.verify.success',
|
|
122
|
+
STATUS_UPDATE_SUCCESS: 'user.status.update.success',
|
|
123
|
+
LOOKUP_SUCCESS: 'user.lookup.success'
|
|
124
|
+
};
|
|
125
|
+
const COMPANY_MESSAGES = {
|
|
126
|
+
READONLY_DELETE_FORBIDDEN: 'company.readonly.delete.forbidden'
|
|
127
|
+
};
|
|
128
|
+
const BRANCH_MESSAGES = {
|
|
129
|
+
READONLY_DELETE_FORBIDDEN: 'branch.readonly.delete.forbidden'
|
|
130
|
+
};
|
|
131
|
+
const USER_PERMISSION_MESSAGES = {
|
|
132
|
+
COMPANY_LIST_SUCCESS: 'user.permission.company.list.success',
|
|
133
|
+
BRANCH_LIST_SUCCESS: 'user.permission.branch.list.success',
|
|
134
|
+
BATCH_SUCCESS: 'user.permission.batch.success',
|
|
135
|
+
ALREADY_ASSIGNED: 'user.permission.already.assigned',
|
|
136
|
+
PERMISSION_NOT_FOUND: 'user.permission.not.found',
|
|
137
|
+
COMPANY_NO_ACCESS: 'user.permission.company.no.access',
|
|
138
|
+
BRANCH_NO_ACCESS: 'user.permission.branch.no.access'
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
142
|
+
}, {
|
|
143
|
+
HZ: SOCIAL_AUTH_CONFIG_MESSAGES,
|
|
144
|
+
OF: SOCIAL_AUTH_MESSAGES,
|
|
145
|
+
W1: BRANCH_MESSAGES,
|
|
146
|
+
hg: COMPANY_MESSAGES,
|
|
147
|
+
jz: USER_PERMISSION_MESSAGES,
|
|
148
|
+
mK: AUTH_MESSAGES,
|
|
149
|
+
ny: USER_MESSAGES,
|
|
150
|
+
sv: EMAIL_VERIFICATION_MESSAGES
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
},
|
|
155
|
+
5207(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
156
|
+
/* import */ var _flusys_nestjs_shared_utils__rspack_import_0 = __webpack_require__(9216);
|
|
157
|
+
/* import */ var _nestjs_common__rspack_import_1 = __webpack_require__(6157);
|
|
158
|
+
/* import */ var rxjs__rspack_import_2 = __webpack_require__(7271);
|
|
159
|
+
/* import */ var _config_index_js__rspack_import_4 = __webpack_require__(5588);
|
|
160
|
+
/* import */ var _services_auth_config_service_js__rspack_import_3 = __webpack_require__(6514);
|
|
161
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
162
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
163
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
164
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
165
|
+
} else {
|
|
166
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
167
|
+
if (d = decorators[i]) {
|
|
168
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
173
|
+
}
|
|
174
|
+
function _ts_metadata(metadataKey, metadataValue) {
|
|
175
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
176
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
function _ts_param(paramIndex, decorator) {
|
|
180
|
+
return function(target, key) {
|
|
181
|
+
decorator(target, key, paramIndex);
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
class ClearToken {
|
|
190
|
+
authConfig;
|
|
191
|
+
constructor(authConfig){
|
|
192
|
+
this.authConfig = authConfig;
|
|
193
|
+
}
|
|
194
|
+
get cookieName() {
|
|
195
|
+
return this.authConfig?.getRefreshTokenCookieName() ?? _config_index_js__rspack_import_4/* .DEFAULT_COOKIE_NAME */.rv;
|
|
196
|
+
}
|
|
197
|
+
intercept(context, next) {
|
|
198
|
+
const req = context.switchToHttp().getRequest();
|
|
199
|
+
const res = context.switchToHttp().getResponse();
|
|
200
|
+
return next.handle().pipe((0,rxjs__rspack_import_2.map)((value)=>{
|
|
201
|
+
if ((0,_flusys_nestjs_shared_utils__rspack_import_0.isBrowserRequest)(req)) {
|
|
202
|
+
res.clearCookie(this.cookieName, {
|
|
203
|
+
httpOnly: true,
|
|
204
|
+
path: '/',
|
|
205
|
+
...(0,_flusys_nestjs_shared_utils__rspack_import_0.buildCookieOptions)(req)
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
return value;
|
|
209
|
+
}));
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
ClearToken = _ts_decorate([
|
|
213
|
+
(0,_nestjs_common__rspack_import_1.Injectable)(),
|
|
214
|
+
_ts_param(0, (0,_nestjs_common__rspack_import_1.Optional)()),
|
|
215
|
+
_ts_metadata("design:type", Function),
|
|
216
|
+
_ts_metadata("design:paramtypes", [
|
|
217
|
+
typeof _services_auth_config_service_js__rspack_import_3/* .AuthConfigService */.W === "undefined" ? Object : _services_auth_config_service_js__rspack_import_3/* .AuthConfigService */.W
|
|
218
|
+
])
|
|
219
|
+
], ClearToken);
|
|
220
|
+
|
|
221
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
222
|
+
t: () => (ClearToken)
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
},
|
|
227
|
+
1867(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
228
|
+
/* import */ var _clear_token_interceptor_js__rspack_import_0 = __webpack_require__(5207);
|
|
229
|
+
/* import */ var _set_token_interceptor_js__rspack_import_1 = __webpack_require__(8359);
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
234
|
+
A: () => (/* reexport safe */ _set_token_interceptor_js__rspack_import_1.A),
|
|
235
|
+
t: () => (/* reexport safe */ _clear_token_interceptor_js__rspack_import_0.t)
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
},
|
|
240
|
+
8359(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
241
|
+
|
|
242
|
+
// EXPORTS
|
|
243
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
244
|
+
A: () => (/* binding */ SetToken)
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
// EXTERNAL MODULE: external "@flusys/nestjs-shared/utils"
|
|
248
|
+
var utils_ = __webpack_require__(9216);
|
|
249
|
+
// EXTERNAL MODULE: ./projects/nestjs-auth/src/config/message-keys.ts
|
|
250
|
+
var message_keys = __webpack_require__(5363);
|
|
251
|
+
// EXTERNAL MODULE: external "@nestjs/common"
|
|
252
|
+
var common_ = __webpack_require__(6157);
|
|
253
|
+
;// CONCATENATED MODULE: external "buffer"
|
|
254
|
+
|
|
255
|
+
// EXTERNAL MODULE: external "rxjs"
|
|
256
|
+
var external_rxjs_ = __webpack_require__(7271);
|
|
257
|
+
// EXTERNAL MODULE: ./projects/nestjs-auth/src/config/auth.constants.ts
|
|
258
|
+
var auth_constants = __webpack_require__(5588);
|
|
259
|
+
// EXTERNAL MODULE: ./projects/nestjs-auth/src/services/auth-config.service.ts + 1 modules
|
|
260
|
+
var auth_config_service = __webpack_require__(6514);
|
|
261
|
+
;// CONCATENATED MODULE: ./projects/nestjs-auth/src/interceptors/set-token.interceptor.ts
|
|
262
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
263
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
264
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
265
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
266
|
+
} else {
|
|
267
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
268
|
+
if (d = decorators[i]) {
|
|
269
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
274
|
+
}
|
|
275
|
+
function _ts_metadata(metadataKey, metadataValue) {
|
|
276
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
277
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
function _ts_param(paramIndex, decorator) {
|
|
281
|
+
return function(target, key) {
|
|
282
|
+
decorator(target, key, paramIndex);
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
class SetToken {
|
|
293
|
+
authConfig;
|
|
294
|
+
constructor(authConfig){
|
|
295
|
+
this.authConfig = authConfig;
|
|
296
|
+
}
|
|
297
|
+
get cookieName() {
|
|
298
|
+
return this.authConfig?.getRefreshTokenCookieName() ?? auth_constants/* .DEFAULT_COOKIE_NAME */.rv;
|
|
299
|
+
}
|
|
300
|
+
get maxAgeMs() {
|
|
301
|
+
return (0,utils_.parseDurationToMs)(this.authConfig?.getRefreshTokenExpiration() ?? '7d');
|
|
302
|
+
}
|
|
303
|
+
intercept(context, next) {
|
|
304
|
+
const req = context.switchToHttp().getRequest();
|
|
305
|
+
const res = context.switchToHttp().getResponse();
|
|
306
|
+
return next.handle().pipe((0,external_rxjs_.map)((value)=>{
|
|
307
|
+
if (typeof value !== 'object' || value === null) {
|
|
308
|
+
return value;
|
|
309
|
+
}
|
|
310
|
+
const response = value;
|
|
311
|
+
const data = typeof response['data'] === 'object' && response['data'] !== null ? response['data'] : null;
|
|
312
|
+
const tokenInData = data && typeof data['refreshToken'] === 'string';
|
|
313
|
+
if (!tokenInData) {
|
|
314
|
+
return value;
|
|
315
|
+
}
|
|
316
|
+
if (!(0,utils_.isBrowserRequest)(req)) {
|
|
317
|
+
return value;
|
|
318
|
+
}
|
|
319
|
+
this.setRefreshTokenCookie(req, res, data['refreshToken']);
|
|
320
|
+
const { refreshToken: _, ...dataWithoutToken } = data;
|
|
321
|
+
return {
|
|
322
|
+
...response,
|
|
323
|
+
data: dataWithoutToken
|
|
324
|
+
};
|
|
325
|
+
}), (0,external_rxjs_.catchError)((err)=>(0,external_rxjs_.throwError)(()=>err)));
|
|
326
|
+
}
|
|
327
|
+
setRefreshTokenCookie(req, res, tokenValue) {
|
|
328
|
+
const rawCookieString = `${this.cookieName}=${tokenValue}; HttpOnly`;
|
|
329
|
+
const estimatedBytes = __rspack_external_buffer.Buffer.byteLength(rawCookieString, 'utf8');
|
|
330
|
+
if (estimatedBytes > (/* inlined export .MAX_COOKIE_BYTES */3500)) {
|
|
331
|
+
throw new common_.PayloadTooLargeException({
|
|
332
|
+
message: `Refresh token too large (≈${estimatedBytes} bytes)`,
|
|
333
|
+
messageKey: message_keys/* .AUTH_MESSAGES.TOKEN_TOO_LARGE */.mK.TOKEN_TOO_LARGE,
|
|
334
|
+
messageVariables: {
|
|
335
|
+
size: estimatedBytes
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
res.cookie(this.cookieName, tokenValue, {
|
|
340
|
+
httpOnly: true,
|
|
341
|
+
path: '/',
|
|
342
|
+
maxAge: this.maxAgeMs,
|
|
343
|
+
...(0,utils_.buildCookieOptions)(req)
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
SetToken = _ts_decorate([
|
|
348
|
+
(0,common_.Injectable)(),
|
|
349
|
+
_ts_param(0, (0,common_.Optional)()),
|
|
350
|
+
_ts_param(0, (0,common_.Inject)(auth_config_service/* .AuthConfigService */.W)),
|
|
351
|
+
_ts_metadata("design:type", Function),
|
|
352
|
+
_ts_metadata("design:paramtypes", [
|
|
353
|
+
typeof auth_config_service/* .AuthConfigService */.W === "undefined" ? Object : auth_config_service/* .AuthConfigService */.W
|
|
354
|
+
])
|
|
355
|
+
], SetToken);
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
},
|
|
359
|
+
6514(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
360
|
+
|
|
361
|
+
// EXPORTS
|
|
362
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
363
|
+
W: () => (/* binding */ AuthConfigService)
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
;// CONCATENATED MODULE: external "@flusys/nestjs-core/config"
|
|
367
|
+
|
|
368
|
+
// EXTERNAL MODULE: external "@flusys/nestjs-shared/constants"
|
|
369
|
+
var constants_ = __webpack_require__(9140);
|
|
370
|
+
// EXTERNAL MODULE: external "@nestjs/common"
|
|
371
|
+
var common_ = __webpack_require__(6157);
|
|
372
|
+
// EXTERNAL MODULE: ./projects/nestjs-auth/src/config/auth.constants.ts
|
|
373
|
+
var auth_constants = __webpack_require__(5588);
|
|
374
|
+
;// CONCATENATED MODULE: ./projects/nestjs-auth/src/services/auth-config.service.ts
|
|
375
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
376
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
377
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
378
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
379
|
+
} else {
|
|
380
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
381
|
+
if (d = decorators[i]) {
|
|
382
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
387
|
+
}
|
|
388
|
+
function _ts_metadata(metadataKey, metadataValue) {
|
|
389
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
390
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
function _ts_param(paramIndex, decorator) {
|
|
394
|
+
return function(target, key) {
|
|
395
|
+
decorator(target, key, paramIndex);
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
class AuthConfigService {
|
|
403
|
+
options;
|
|
404
|
+
config;
|
|
405
|
+
constructor(injectedOptions){
|
|
406
|
+
this.options = injectedOptions ?? {
|
|
407
|
+
global: false,
|
|
408
|
+
includeController: true
|
|
409
|
+
};
|
|
410
|
+
this.config = this.options.config ?? {};
|
|
411
|
+
}
|
|
412
|
+
// Database Mode (required by IModuleConfigService)
|
|
413
|
+
getDatabaseMode() {
|
|
414
|
+
return this.options.bootstrapAppConfig?.databaseMode ?? 'single';
|
|
415
|
+
}
|
|
416
|
+
isMultiTenant() {
|
|
417
|
+
return this.getDatabaseMode() === 'multi-tenant';
|
|
418
|
+
}
|
|
419
|
+
// Feature Flags
|
|
420
|
+
isCompanyFeatureEnabled() {
|
|
421
|
+
return this.options.bootstrapAppConfig?.enableCompanyFeature ?? false;
|
|
422
|
+
}
|
|
423
|
+
isEmailVerificationEnabled() {
|
|
424
|
+
return this.options.bootstrapAppConfig?.enableEmailVerification ?? true;
|
|
425
|
+
}
|
|
426
|
+
isSignUpEnabled() {
|
|
427
|
+
return this.options.bootstrapAppConfig?.enableSignUp ?? true;
|
|
428
|
+
}
|
|
429
|
+
isPermissionModeFound() {
|
|
430
|
+
return this.options.bootstrapAppConfig?.permissionMode !== undefined;
|
|
431
|
+
}
|
|
432
|
+
// JWT Configuration
|
|
433
|
+
getJwtSecret() {
|
|
434
|
+
if (!this.config.jwtSecret) {
|
|
435
|
+
throw new common_.InternalServerErrorException({
|
|
436
|
+
message: '[AuthModule] JWT_SECRET is required - set via environment or module config',
|
|
437
|
+
messageKey: constants_.SYSTEM_MESSAGES.CONFIG_REQUIRED
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
return this.config.jwtSecret;
|
|
441
|
+
}
|
|
442
|
+
getJwtExpiration() {
|
|
443
|
+
return this.config.jwtExpiration ?? '1h';
|
|
444
|
+
}
|
|
445
|
+
getRefreshTokenSecret() {
|
|
446
|
+
if (this.config.refreshTokenSecret) {
|
|
447
|
+
return this.config.refreshTokenSecret;
|
|
448
|
+
}
|
|
449
|
+
if (__rspack_external__flusys_nestjs_core_config_197fa0a9.envConfig.isProduction()) {
|
|
450
|
+
throw new common_.InternalServerErrorException({
|
|
451
|
+
message: '[AuthModule] REFRESH_TOKEN_SECRET is required in production - using the same secret for access and refresh tokens is a security risk',
|
|
452
|
+
messageKey: constants_.SYSTEM_MESSAGES.CONFIG_REQUIRED
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
return this.getJwtSecret();
|
|
456
|
+
}
|
|
457
|
+
getRefreshTokenExpiration() {
|
|
458
|
+
return this.config.refreshTokenExpiration ?? '7d';
|
|
459
|
+
}
|
|
460
|
+
getRefreshTokenCookieName() {
|
|
461
|
+
return this.config.refreshTokenCookieName ?? 'fsn_refresh_token';
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
AuthConfigService = _ts_decorate([
|
|
465
|
+
(0,common_.Injectable)(),
|
|
466
|
+
_ts_param(0, (0,common_.Optional)()),
|
|
467
|
+
_ts_param(0, (0,common_.Inject)(auth_constants/* .AUTH_MODULE_OPTIONS */.xe)),
|
|
468
|
+
_ts_metadata("design:type", Function),
|
|
469
|
+
_ts_metadata("design:paramtypes", [
|
|
470
|
+
typeof AuthModuleOptions === "undefined" ? Object : AuthModuleOptions
|
|
471
|
+
])
|
|
472
|
+
], AuthConfigService);
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
},
|
|
476
|
+
9140(module) {
|
|
477
|
+
|
|
478
|
+
module.exports = __rspack_external__flusys_nestjs_shared_constants_81f33d5b;
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
},
|
|
482
|
+
9216(module) {
|
|
483
|
+
|
|
484
|
+
module.exports = __rspack_external__flusys_nestjs_shared_utils_9125c1f1;
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
},
|
|
488
|
+
6157(module) {
|
|
489
|
+
|
|
490
|
+
module.exports = __rspack_external__nestjs_common_a04939da;
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
},
|
|
494
|
+
7271(module) {
|
|
495
|
+
|
|
496
|
+
module.exports = __rspack_external_rxjs;
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
},
|
|
500
|
+
|
|
501
|
+
};
|
|
502
|
+
import { __webpack_require__ } from '../runtime.js';
|
|
503
|
+
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
|
504
|
+
import * as __rspack_chunk_1 from './index.js';
|
|
505
|
+
__webpack_require__.C(__rspack_chunk_1);
|
|
506
|
+
var __webpack_exports__ = __webpack_exec__(1867);var __webpack_exports__ClearToken = __webpack_exports__.t;
|
|
507
|
+
var __webpack_exports__SetToken = __webpack_exports__.A;
|
|
508
|
+
export { __webpack_exports__ClearToken as ClearToken, __webpack_exports__SetToken as SetToken };
|
package/fesm/interfaces/index.js
CHANGED
|
@@ -1,7 +1,75 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export const __rspack_esm_id = 471;
|
|
2
|
+
export const __rspack_esm_ids = [471];
|
|
3
|
+
export const __webpack_modules__ = {
|
|
4
|
+
9125(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
5
|
+
/**
|
|
6
|
+
* Auth Email Provider Interface
|
|
7
|
+
*
|
|
8
|
+
* This interface defines the contract for email sending in the auth module.
|
|
9
|
+
* It allows auth to work independently of the email module.
|
|
10
|
+
*
|
|
11
|
+
* To use email features in auth:
|
|
12
|
+
* 1. Provide AUTH_EMAIL_PROVIDER in your app module
|
|
13
|
+
* 2. Implement IAuthEmailProvider using EmailSendService from nestjs-email
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // In app.module.ts or a provider file
|
|
18
|
+
* {
|
|
19
|
+
* provide: AUTH_EMAIL_PROVIDER,
|
|
20
|
+
* useFactory: (emailSendService: EmailSendService) => ({
|
|
21
|
+
* sendPasswordResetEmail: async (email, token, resetUrl) => {
|
|
22
|
+
* await emailSendService.sendTemplateEmail({
|
|
23
|
+
* templateSlug: 'password-reset',
|
|
24
|
+
* to: email,
|
|
25
|
+
* variables: { resetUrl, token },
|
|
26
|
+
* });
|
|
27
|
+
* },
|
|
28
|
+
* sendVerificationEmail: async (email, token, verifyUrl) => {
|
|
29
|
+
* await emailSendService.sendTemplateEmail({
|
|
30
|
+
* templateSlug: 'email-verification',
|
|
31
|
+
* to: email,
|
|
32
|
+
* variables: { verifyUrl, token },
|
|
33
|
+
* });
|
|
34
|
+
* },
|
|
35
|
+
* }),
|
|
36
|
+
* inject: [EmailSendService],
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*/ /**
|
|
40
|
+
* Injection token for auth email provider
|
|
41
|
+
* Use this to provide the email implementation
|
|
42
|
+
*/ const AUTH_EMAIL_PROVIDER = 'AUTH_EMAIL_PROVIDER';
|
|
43
|
+
|
|
44
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
45
|
+
}, {
|
|
46
|
+
C: AUTH_EMAIL_PROVIDER
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
},
|
|
51
|
+
9487(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
52
|
+
/* import */ var _auth_email_provider_interface_js__rspack_import_0 = __webpack_require__(9125);
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
63
|
+
C: () => (/* reexport safe */ _auth_email_provider_interface_js__rspack_import_0.C)
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
};
|
|
70
|
+
import { __webpack_require__ } from '../runtime.js';
|
|
71
|
+
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
|
72
|
+
import * as __rspack_chunk_1 from './index.js';
|
|
73
|
+
__webpack_require__.C(__rspack_chunk_1);
|
|
74
|
+
var __webpack_exports__ = __webpack_exec__(9487);var __webpack_exports__AUTH_EMAIL_PROVIDER = __webpack_exports__.C;
|
|
75
|
+
export { __webpack_exports__AUTH_EMAIL_PROVIDER as AUTH_EMAIL_PROVIDER };
|