Skip to content

fix: repair invite flow — URL prefix + registration UI (fixes #67) - #542

Merged
ascorbic merged 4 commits into
emdash-cms:mainfrom
mohamedmostafa58:fix/invite-flow
Apr 14, 2026
Merged

ascorbic merged 4 commits into
emdash-cms:mainfrom
mohamedmostafa58:fix/invite-flow

Conversation

@mohamedmostafa58

Copy link
Copy Markdown
Contributor

Summary

Fixes the broken invite system (#67). Based on PR #81 by @SrikanthAlva with the failing test fix applied.

  • Fix invite URL construction to point to admin UI page instead of raw API endpoint
  • Add InviteAcceptPage for passkey registration
  • Fix test assertion to match new URL path

Closes #67

…test

Fixes the two compounding bugs in the user invite system (Issue emdash-cms#67):

- Bug 1: Invite URL drops /_emdash/ prefix. Fixed by pointing to admin UI page.
- Bug 2: No UI to complete registration. Added InviteAcceptPage with passkey registration.
- Bug 3 (from PR emdash-cms#81 review): Fixed failing test assertion to match new URL path.

Based on PR emdash-cms#81 by @SrikanthAlva with the requested test fix applied.

Closes emdash-cms#67
@changeset-bot

changeset-bot Bot commented Apr 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e018395

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@emdash-cms/admin Patch
@emdash-cms/auth Patch
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/blocks Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
create-emdash Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Apr 13, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@github-actions

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 720 lines across 12 files. Large PRs are harder to review and more likely to be closed without review.

If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs.

See CONTRIBUTING.md for contribution guidelines.

@mohamedmostafa58

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@nickgraynews

Copy link
Copy Markdown
Contributor

Yes please! We need this to work so we can onboard more users to our sites

@github-actions

Copy link
Copy Markdown
Contributor

Overlapping PRs

This PR modifies files that are also changed by other open PRs:

This may cause merge conflicts or duplicated work. A maintainer will coordinate.

@pkg-pr-new

pkg-pr-new Bot commented Apr 14, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@542

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@542

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@542

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@542

emdash

npm i https://pkg.pr.new/emdash@542

create-emdash

npm i https://pkg.pr.new/create-emdash@542

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@542

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@542

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@542

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@542

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@542

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@542

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@542

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@542

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@542

commit: e018395

@ascorbic ascorbic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just a few comments

Comment thread packages/admin/src/lib/api/users.ts Resolved

@ascorbic ascorbic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ascorbic

Copy link
Copy Markdown
Member

@mohamedmostafa58 Can you fix the e2e test failures?

Making /_emdash/admin/signup a public server-side route allowed
unauthenticated direct access. The signup page is only intended
to be reached via client-side navigation from the login page.

Made-with: Cursor
@ascorbic
ascorbic merged commit 64f90d1 into emdash-cms:main Apr 14, 2026
25 of 26 checks passed
@emdashbot emdashbot Bot mentioned this pull request Apr 14, 2026
0aveRyan pushed a commit to 0aveRyan/emdash that referenced this pull request Apr 27, 2026
…cms#67) (emdash-cms#542)

* fix: repair invite flow — URL prefix + registration UI + fix failing test

Fixes the two compounding bugs in the user invite system (Issue emdash-cms#67):

- Bug 1: Invite URL drops /_emdash/ prefix. Fixed by pointing to admin UI page.
- Bug 2: No UI to complete registration. Added InviteAcceptPage with passkey registration.
- Bug 3 (from PR emdash-cms#81 review): Fixed failing test assertion to match new URL path.

Based on PR emdash-cms#81 by @SrikanthAlva with the requested test fix applied.

Closes emdash-cms#67

* fix: address review comments — remove unused code, use ULID, useSearch, fix duplicate button, simplify email store

* fix(auth): remove signup from public admin routes

Making /_emdash/admin/signup a public server-side route allowed
unauthenticated direct access. The signup page is only intended
to be reached via client-side navigation from the login page.

Made-with: Cursor

---------

Co-authored-by: Matt Kane <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User invite system: wrong URL (missing /_emdash/ prefix) + no UI to complete registration

3 participants