diff --git a/packages/authhero/src/emails/index.ts b/packages/authhero/src/emails/index.ts
index a0ce27a..c799f12 100644
--- a/packages/authhero/src/emails/index.ts
+++ b/packages/authhero/src/emails/index.ts
@@ -16,7 +16,7 @@ export async function sendEmail(
throw new HTTPException(500, { message: "Email provider not found" });
}
- const emailService = ctx.env.emailProvders?.[emailProvider.name];
+ const emailService = ctx.env.emailProviders?.[emailProvider.name];
if (!emailService) {
throw new HTTPException(500, { message: "Email provider not found" });
}
diff --git a/packages/authhero/src/emails/templates/password-reset.ts b/packages/authhero/src/emails/templates/password-reset.ts
deleted file mode 100644
index 3246a63..0000000
--- a/packages/authhero/src/emails/templates/password-reset.ts
+++ /dev/null
@@ -1,350 +0,0 @@
-export const passwordReset = `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
- |
-
-
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{passwordResetTitle}}
- |
-
-
-
- {{resetPasswordEmailClickToReset}}
- |
-
-
-
-
- |
-
-
-
- |
-
-
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
- {{supportInfo}}
- |
-
-
- |
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- {{copyright}}
- |
-
-
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
- |
-
-
-
-
-
- |
-
-
-
-
-
-
-
-
-
-`;
diff --git a/packages/authhero/src/routes/auth-api/dbconnections.ts b/packages/authhero/src/routes/auth-api/dbconnections.ts
index c726954..6d7f78a 100644
--- a/packages/authhero/src/routes/auth-api/dbconnections.ts
+++ b/packages/authhero/src/routes/auth-api/dbconnections.ts
@@ -104,9 +104,10 @@ export const dbConnectionRoutes = new OpenAPIHono<{
ctx.set("connection", newUser.connection);
// Store the password
+ const hashedPassword = await bcryptjs.hash(password, 10);
await ctx.env.data.passwords.create(client.tenant.id, {
user_id: newUser.user_id,
- password: bcryptjs.hashSync(password, 10),
+ password: hashedPassword,
algorithm: "bcrypt",
});
diff --git a/packages/authhero/src/types/Bindings.ts b/packages/authhero/src/types/Bindings.ts
index e47f957..fe53f1d 100644
--- a/packages/authhero/src/types/Bindings.ts
+++ b/packages/authhero/src/types/Bindings.ts
@@ -18,7 +18,7 @@ export type Bindings = {
hooks?: {
onExecuteCredentialsExchange?: OnExecuteCredentialsExchange;
};
- emailProvders?: { [key: string]: EmailService };
+ emailProviders?: { [key: string]: EmailService };
// Constants
JWKS_CACHE_TIMEOUT_IN_SECONDS: number;
diff --git a/packages/authhero/test/helpers/test-server.ts b/packages/authhero/test/helpers/test-server.ts
index dc5de8d..d8fc48b 100644
--- a/packages/authhero/test/helpers/test-server.ts
+++ b/packages/authhero/test/helpers/test-server.ts
@@ -85,7 +85,7 @@ export async function getTestServer(args: getEnvParams = {}) {
const env: Bindings = {
data,
- emailProvders: {
+ emailProviders: {
"mock-email": mockEmailService.sendEmail.bind(mockEmailService),
},
JWKS_SERVICE: {