rez_core 2.2.205 → 2.2.207
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/notification/controller/otp.controller.d.ts +2 -0
- package/dist/module/notification/service/otp.service.d.ts +2 -0
- package/dist/module/user/controller/login.controller.js +3 -0
- package/dist/module/user/controller/login.controller.js.map +1 -1
- package/dist/module/user/service/login.service.d.ts +4 -0
- package/dist/module/user/service/login.service.js +9 -0
- package/dist/module/user/service/login.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/user/controller/login.controller.ts +6 -0
- package/src/module/user/service/login.service.ts +12 -0
- package/src/resources/dev.properties.yaml +1 -0
package/package.json
CHANGED
|
@@ -136,6 +136,12 @@ export class LoginController {
|
|
|
136
136
|
);
|
|
137
137
|
|
|
138
138
|
const { accessToken, appcode } = data;
|
|
139
|
+
if (data.slug) {
|
|
140
|
+
return res.redirect(
|
|
141
|
+
`https://${data.slug}.${this.configService.get('DOMAIN_URL')}/auth?token=${accessToken}&appcode=${appcode}`,
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
139
145
|
return res.redirect(
|
|
140
146
|
`${this.configService.get('BASE_URL')}/auth?token=${accessToken}&appcode=${appcode}`,
|
|
141
147
|
);
|
|
@@ -180,12 +180,24 @@ export class LoginService {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
// 🔹 Step 8: Return response
|
|
183
|
+
|
|
184
|
+
const org = await this.organizationRepository.findOrganizationById(
|
|
185
|
+
user.organization_id,
|
|
186
|
+
);
|
|
187
|
+
let slug: string;
|
|
188
|
+
if (org) {
|
|
189
|
+
slug = org.subdomain;
|
|
190
|
+
} else {
|
|
191
|
+
throw new BadRequestException();
|
|
192
|
+
}
|
|
193
|
+
|
|
183
194
|
return {
|
|
184
195
|
success: true,
|
|
185
196
|
accessToken: token,
|
|
186
197
|
appcode: defaultAccess.appcode,
|
|
187
198
|
level_type: defaultAccess.level_type,
|
|
188
199
|
level_id: defaultAccess.level_id,
|
|
200
|
+
slug: slug,
|
|
189
201
|
};
|
|
190
202
|
}
|
|
191
203
|
|
|
@@ -11,6 +11,7 @@ CLIENT_ID: '819281384645-2tnuvm80sul1n2ahqa4eg6kjd19pnbu9.apps.googleusercontent
|
|
|
11
11
|
CLIENT_SECRET: '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'
|
|
12
12
|
CALLBACK_URL: 'http://localhost:5001/auth/google/callback'
|
|
13
13
|
BASE_URL: 'http://localhost:5001'
|
|
14
|
+
DOMAIN_URL: 'rezolut.in'
|
|
14
15
|
OTP_EXPIRY: '10'
|
|
15
16
|
OTP_LENGTH: '6'
|
|
16
17
|
VERIFY_OTP: 'false'
|