"Forgot your password?" on web and mobile sends a one-time link (1 hour) to the account's email; the website's reset page sets the new password, signs out every other session and signs in. The request responds the same whether or not the email has an account, and the email goes out in the background so timing doesn't reveal it either. Only a hash of the link token is stored. Sends through SMTP_* settings; without them, emails are logged (and captured in tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzFywujuH9TiuXbr9vjoX8
This commit is contained in:
@@ -37,6 +37,12 @@ const schema = z.object({
|
||||
* dev or self-hosting: in a hosted deployment it lets users make the server
|
||||
* request internal addresses (SSRF).
|
||||
*/
|
||||
/** Outgoing email (password resets). Without SMTP_HOST, emails are only logged. */
|
||||
SMTP_HOST: optional,
|
||||
SMTP_PORT: z.coerce.number().default(465),
|
||||
SMTP_USER: optional,
|
||||
SMTP_PASSWORD: optional,
|
||||
MAIL_FROM: z.string().default('musicshare <app@musicshare.binarygnome.com>'),
|
||||
ALLOW_PRIVATE_SERVER_URLS: z
|
||||
.string()
|
||||
.default('false')
|
||||
@@ -47,3 +53,4 @@ export const env = schema.parse(process.env);
|
||||
|
||||
export const spotifyConfigured = Boolean(env.SPOTIFY_CLIENT_ID && env.SPOTIFY_CLIENT_SECRET);
|
||||
export const appleMusicConfigured = Boolean(env.APPLE_TEAM_ID && env.APPLE_MUSICKIT_KEY_ID && env.APPLE_MUSICKIT_PRIVATE_KEY);
|
||||
export const mailConfigured = Boolean(env.SMTP_HOST);
|
||||
|
||||
Reference in New Issue
Block a user