Skip to content

Chore: upgrade remix-auth-email-link to 2.1.1, crypto-js to 4.2.0 #1753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions apps/webapp/app/services/email.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ const alertsClient = singleton(
);

function buildTransportOptions(alerts?: boolean): MailTransportOptions {
const transportType = alerts ? env.ALERT_EMAIL_TRANSPORT : env.EMAIL_TRANSPORT
logger.debug(`Constructing email transport '${transportType}' for usage '${alerts?'alerts':'general'}'`)
const transportType = alerts ? env.ALERT_EMAIL_TRANSPORT : env.EMAIL_TRANSPORT;
logger.debug(
`Constructing email transport '${transportType}' for usage '${alerts ? "alerts" : "general"}'`
);

switch (transportType) {
case "aws-ses":
Expand All @@ -43,8 +45,8 @@ function buildTransportOptions(alerts?: boolean): MailTransportOptions {
type: "resend",
config: {
apiKey: alerts ? env.ALERT_RESEND_API_KEY : env.RESEND_API_KEY,
}
}
},
};
case "smtp":
return {
type: "smtp",
Expand All @@ -54,20 +56,20 @@ function buildTransportOptions(alerts?: boolean): MailTransportOptions {
secure: alerts ? env.ALERT_SMTP_SECURE : env.SMTP_SECURE,
auth: {
user: alerts ? env.ALERT_SMTP_USER : env.SMTP_USER,
pass: alerts ? env.ALERT_SMTP_PASSWORD : env.SMTP_PASSWORD
}
}
pass: alerts ? env.ALERT_SMTP_PASSWORD : env.SMTP_PASSWORD,
},
},
};
default:
return { type: undefined };
}
}

export async function sendMagicLinkEmail(options: SendEmailOptions<AuthUser>): Promise<void> {
// Auto redirect when in development mode
if (env.NODE_ENV === "development") {
throw redirect(options.magicLink);
}
// // Auto redirect when in development mode
// if (env.NODE_ENV === "development") {
// throw redirect(options.magicLink);
// }

logger.debug("Sending magic link email", { emailAddress: options.emailAddress });

Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"recharts": "^2.12.6",
"regression": "^2.0.1",
"remix-auth": "^3.6.0",
"remix-auth-email-link": "2.0.2",
"remix-auth-email-link": "2.1.1",
"remix-auth-github": "^1.6.0",
"remix-typedjson": "0.3.1",
"remix-utils": "^7.1.0",
Expand Down
18 changes: 7 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.