@xenterprises/fastify-xconfig 0.0.3 → 0.0.5
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 +1 -1
- package/src/auth/portal.js +5 -5
package/package.json
CHANGED
package/src/auth/portal.js
CHANGED
|
@@ -115,10 +115,10 @@ export async function setupAuth(fastify, options) {
|
|
|
115
115
|
},
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
-
// Send welcome email
|
|
119
|
-
if (options.user?.sendWelcomeEmail) {
|
|
120
|
-
|
|
121
|
-
}
|
|
118
|
+
// // Send welcome email
|
|
119
|
+
// if (options.user?.sendWelcomeEmail) {
|
|
120
|
+
// await fastify.sendGrid.sendEmail(email, auth?.user?.registerEmail?.subject, auth?.user?.registerEmail?.templateId, { name: firstName, email });
|
|
121
|
+
// }
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
// Issue access token
|
|
@@ -218,7 +218,7 @@ export async function setupAuth(fastify, options) {
|
|
|
218
218
|
const accessToken = await reply.userJwtSign({ id: user.id });
|
|
219
219
|
|
|
220
220
|
// Generate new refresh token
|
|
221
|
-
const newRefreshToken = randomUUID();
|
|
221
|
+
const newRefreshToken = fastify.randomUUID();
|
|
222
222
|
const hashedNewRefreshToken = await bcrypt.hash(newRefreshToken, 10);
|
|
223
223
|
|
|
224
224
|
// Update refresh token in the database
|