-
Notifications
You must be signed in to change notification settings - Fork 404
Brand transactional auth emails per app #2439
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
timmilazzo
wants to merge
22
commits into
main
Choose a base branch
from
ai_main_a22984fd7a074c0f90c5
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
75e69fe
Brand signup verification emails per app
builderio-bot 1c36599
feat(email): add customer-facing descriptions for verification email
builderio-bot 4fa7577
feat(auth): implement per-app forgot password emails
builderio-bot 7eb25a2
Merge remote-tracking branch 'refs/remotes/origin/main' into ai_main_…
builderio-bot 7039562
fix(email): scope per-app sender branding to agent-native.com deploym…
builderio-bot afcbf26
chore(email): route transactional reply-to to agent-native@builder.io
builderio-bot 0f7d24a
Merge remote-tracking branch 'refs/remotes/origin/main' into ai_main_…
builderio-bot e4dc584
fix(email): sanitize branded sender display name
builderio-bot 241c8af
Merge remote-tracking branch 'refs/remotes/origin/main' into ai_main_…
builderio-bot 9b8e98b
Merge remote-tracking branch 'refs/remotes/origin/main' into ai_main_…
builderio-bot 7c4356e
Merge remote-tracking branch 'refs/remotes/origin/main' into ai_main_…
builderio-bot 785c01d
test(email): cover branded sender and reply-to on the Resend path
builderio-bot c2ec3a1
Merge remote-tracking branch 'refs/remotes/origin/main' into ai_main_…
builderio-bot 6f69e4d
fix(email): surface suppressed per-app sender branding
builderio-bot 76517e3
fix(email): key branding-suppressed warning by sender config
builderio-bot 99d071b
fix(email): keep tenant sender data out of the suppression warning
builderio-bot 4ca1534
Merge remote-tracking branch 'refs/remotes/origin/main' into ai_main_…
builderio-bot 7d80aae
Merge branch 'main' into ai_main_a22984fd7a074c0f90c5
timmilazzo e03d95b
Merge remote-tracking branch 'refs/remotes/origin/main' into ai_main_…
builderio-bot 703aebb
fix(email): restrict branded sender to first-party templates
builderio-bot 9771881
Merge remote-tracking branch 'refs/remotes/origin/main' into ai_main_…
builderio-bot f82f39f
fix(email): keep custom app names out of Agent-Native branding
builderio-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| "@agent-native/core": patch | ||
| --- | ||
|
|
||
| Brand transactional auth emails per app. Signup verification and password | ||
| reset emails now send from `<app-slug>@agent-native.com` with reply-to | ||
| agent-native@builder.io and per-app subjects/headings ("Verify your email for | ||
| Agent-Native <App>" / "Reset your Agent-Native <App> password"). The | ||
| verification email body also includes the app's one-line description (competitor | ||
| names reframed as "replacement"); the reset email omits the pitch since it's a | ||
| security email. Unknown apps fall back to the generic "Agent Native" branding. | ||
|
|
||
| The branded sender and reply-to are applied only when the configured | ||
| EMAIL_FROM is already on agent-native.com, so self-hosted deployments keep | ||
| their own verified sender and support mailbox. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import { afterEach, describe, expect, it, vi } from "vitest"; | ||
|
|
||
| import { renderVerifySignupEmail } from "./email-templates"; | ||
|
|
||
| describe("renderVerifySignupEmail", () => { | ||
| afterEach(() => { | ||
| vi.unstubAllEnvs(); | ||
| }); | ||
|
|
||
| it("does not mint an agent-native.com mailbox for an unrecognized app", () => { | ||
| vi.stubEnv("APP_NAME", "Acme Portal"); | ||
|
|
||
| const rendered = renderVerifySignupEmail({ | ||
| email: "reader@example.com", | ||
| verifyUrl: "https://example.com/verify?token=abc", | ||
| }); | ||
|
|
||
| // No slug means sendEmail keeps the deployment's configured sender rather | ||
| // than branding a third-party app onto the first-party domain. | ||
| expect(rendered.appSender).toBeUndefined(); | ||
| }); | ||
|
|
||
| it("does not present an unrecognized app as an Agent-Native app", () => { | ||
| vi.stubEnv("APP_NAME", "Acme Portal"); | ||
|
|
||
| const rendered = renderVerifySignupEmail({ | ||
| email: "reader@example.com", | ||
| verifyUrl: "https://example.com/verify?token=abc", | ||
| }); | ||
|
|
||
| expect(rendered.subject).toBe("Verify your email for Acme Portal"); | ||
| expect(rendered.html).not.toContain("Agent-Native Acme Portal"); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.