Repository navigation
Use Better Auth invitation delivery and native resend - #74
Merged
Merged
Conversation
tnkuehne
force-pushed
the
fix/native-invitation-delivery
branch
from
October 22, 2026 14:41
3e20f79 to
0cbea68
Compare
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | 0cbea68 | Oct 22 2026, 02:42 PM |
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.
After invitation email delivery failed, inviting the same address again returned “already invited” with no supported resend action. Route ordinary membership invitation emails through Better Auth's
sendInvitationEmailhook and expose its nativeresendoption through the shared API,widefleet invitations invite EMAIL --resend, and a pending-invitation button.Remove the post-invitation organization lookup and separately orchestrated email send. Better Auth owns creation, role checks, duplicate handling, renewal and sending. Resending an existing pending invitation retains its ID and role and renews the native 48-hour expiry. The operator's existing first-owner provisioning remains separate because it runs before an organization has members; both paths share the same mail formatter and transport.
The installed Better Auth version logs delivery failures and returns the saved invitation successfully. Keep that native behavior: the UI confirms that the invitation was saved, rather than claiming delivery succeeded. A failed delivery remains visible as a pending invitation and can be resent. No new database state, retry queue, dependency or library patch is added.
Native permission detail: an admin can resend an already-issued owner invitation by submitting a non-owner role; Better Auth retains the original owner grant. The admin still cannot create a new owner invitation. The integration test records this behavior rather than adding a custom restriction. The existing UI still hides owner-invitation actions from admins.
Validation:
pnpm checkpasses (workspace types, formatting, type-aware lint).cargo clippy -p platform-cli --all-targets -- -D warningspass.Documentation is maintained separately in #58 and remains unreleased.


Confidence Score: 5/5
The PR appears safe to merge, with no outstanding findings.Summary
Routes invitation emails through Better Auth and adds native resend support to the API, CLI, and members page.
Reviews (2) · Last reviewed commit: "Cover native resend permissions for exis..." · Reviewed by Greptile