Repository navigation
feat(auth): whoami names the address to send mail as (senderEmail) - #4805
Merged
Merged
Conversation
senderEmail is the address an app should use when it sends mail in the user's name. A team seat's email is set by its team, so a seat sends as its <username>@puter.email mailbox; any other account sends as its email once confirmed. It ships only with the email itself, so an app without the email grant neither sees it nor triggers the seat read.
Contributor
BenchmarksNo unaccepted regressions. 72 benchmarks: 0 regressed, 0 accepted, 0 improved, 0 new, 0 removed. All benchmarks
|
Contributor
Coverage Report for puter.js SDK
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
… row's grant - senderEmail uses the account's stored email_confirmed, not the displayed flag, which is forced on for admin. - The email grant and the seat read both key on the loaded row. - A user session's seat read is shared with buildUserDetails and runs beside the other detail reads; a failed read leaves senderEmail out. - Teams on without a team store names no sender. - Bench: whoami with an app token for a passwordless account.
Salazareo
enabled auto-merge (squash)
November 30, 2026 15:18
Salazareo
disabled auto-merge
November 30, 2026 15:18
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
senderEmailto whoami /puter.auth.getUser(): the address an app should use when it sends mail in the user's name.<username>@puter.email. A seat's email is set by its team, so it isn't the user's to send as, and some seats never confirmed it.email_confirmedis set. The displayed flag, which is forced on foradmin, doesn't count.Apps that send mail for the user (Calendar invitations, Spreadsheet, Signatures) were naming the account email even when it was unconfirmed, and a team account with an unconfirmed email couldn't send at all. App side: HeyPuter/everything#258.
Auth / permission callout
senderEmailships under the same rule asemail: a user session, or an app holdinguser:<uuid>:email:read.teamstays user-only.Cost
getOrgSeatread (cached, including misses) per whoami that can read the email, and only whenteams_enabled.buildUserDetails, which already made it, and runs beside the other detail reads.Tests
extensions/whoami.test.tscovers:admin;auth.suite.ts: an account with no email has nosenderEmail.npm run check: lint, typecheck, SDK types and benchmarks pass.guiEmbed.test.jscases, which fail onmaintoo.Docs:
Objects/user.md, theAuth.jstypedef and a changelog entry.