René's URL Explorer Experiment


Title: signIn.create({ strategy: 'ticket' }) silently fails when user has an active session · Issue #8044 · clerk/javascript · GitHub

Open Graph Title: signIn.create({ strategy: 'ticket' }) silently fails when user has an active session · Issue #8044 · clerk/javascript

X Title: signIn.create({ strategy: 'ticket' }) silently fails when user has an active session · Issue #8044 · clerk/javascript

Description: Description When accepting an organization invitation via the custom flow documented here, signIn.create({ strategy: 'ticket' }) silently fails if the user already has an active session on the application side. Steps to reproduce User A ...

Open Graph Description: Description When accepting an organization invitation via the custom flow documented here, signIn.create({ strategy: 'ticket' }) silently fails if the user already has an active session on the appl...

X Description: Description When accepting an organization invitation via the custom flow documented here, signIn.create({ strategy: 'ticket' }) silently fails if the user already has an active session on ...

Opengraph URL: https://github.com/clerk/javascript/issues/8044

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"signIn.create({ strategy: 'ticket' }) silently fails when user has an active session","articleBody":"## Description\n\nWhen accepting an organization invitation via the [custom flow documented here](https://clerk.com/docs/guides/development/custom-flows/organizations/accept-organization-invitations), `signIn.create({ strategy: 'ticket' })` silently fails if the user already has an active session on the application side.\n\n## Steps to reproduce\n\n1. User A is signed in and has an active organization (org1)\n2. User B invites User A to org2 via `organizations.createOrganizationInvitation`\n3. User A clicks the invitation email link\n4. Clerk FAPI redirects to the app with `__clerk_status=sign_in` and `__clerk_ticket=\u003ctoken>`\n5. The custom flow calls `signIn.create({ strategy: 'ticket', ticket: token })`\n6. The call does **not** throw an error, but the invitation stays `pending` — the user is never added to org2\n\n## Root cause\n\nClerk FAPI lives on a different domain than the application (e.g., `clerk.example.com` vs `localhost:3001` or `app.example.com`). Because of this, FAPI cannot detect the user's existing session cookie and returns `__clerk_status=sign_in`, indicating the user needs to sign in.\n\nHowever, on the application side, the user **already has** an active session. When `signIn.create({ strategy: 'ticket' })` is called with this conflicting state (active session + sign_in ticket), it fails silently — no error is thrown, but the invitation is not accepted.\n\n## Expected behavior\n\nEither:\n1. `signIn.create({ strategy: 'ticket' })` should work correctly even when there's an active session (handling the conflict internally), **or**\n2. It should throw a clear error indicating the session conflict so developers can handle it\n\n## Workaround\n\nWe had to call `signOut()` before `signIn.create()` when the user is already signed in:\n\n```tsx\nconst { isSignedIn } = useUser();\nconst { signOut } = useClerk();\n\nif (isSignedIn) {\n  await signOut();\n}\n\nconst signInAttempt = await signIn.create({\n  strategy: \"ticket\",\n  ticket: token,\n});\n```\n\n## Additional context\n\n- The [docs example](https://clerk.com/docs/guides/development/custom-flows/organizations/accept-organization-invitations) guards the sign_in effect with `|| organization` which prevents the effect from running entirely when the user already has an active org — making the documented approach unusable for users who are already members of another organization.\n- Next.js 15, `@clerk/nextjs` latest\n- Tested in development (`localhost`) and the behavior is consistent","author":{"url":"https://github.com/pedrobarretocw","@type":"Person","name":"pedrobarretocw"},"datePublished":"2026-03-11T18:28:45Z","url":"https://github.com/clerk/javascript/issues/8044"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:fd360aa1-81b7-1499-e676-095c6432b2f9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8170:277BD5:10C8043:16F401C:6AFB6766
html-safe-nonce55d72bb5651f1d55203f8078603fb379979eb22a75c09d5924166c2ba57b5fa1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTcwOjI3N0JENToxMEM4MDQzOjE2RjQwMUM6NkFGQjY3NjYiLCJ2aXNpdG9yX2lkIjoiMzcyNTc1MzE3NzUyMjAwNTg2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1c32b59eeba6a1ed005784bfcbde555453c5c98a519dffa3654cc5dc66b25acd
hovercard-subject-tagissue:4059902733
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/clerk/javascript/8044/issue_layout
twitter:imagehttps://opengraph.githubassets.com/50523e7292ffde78edaab857475e2535d25e9b121b0fb5154964c95c5a6ad685/clerk/javascript/issues/8044
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/50523e7292ffde78edaab857475e2535d25e9b121b0fb5154964c95c5a6ad685/clerk/javascript/issues/8044
og:image:altDescription When accepting an organization invitation via the custom flow documented here, signIn.create({ strategy: 'ticket' }) silently fails if the user already has an active session on the appl...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepedrobarretocw
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
turbo-cache-controlno-preview
go-importgithub.com/clerk/javascript git https://github.com/clerk/javascript.git
octolytics-dimension-user_id49538330
octolytics-dimension-user_loginclerk
octolytics-dimension-repository_id438331492
octolytics-dimension-repository_nwoclerk/javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id438331492
octolytics-dimension-repository_network_root_nwoclerk/javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/clerk/javascript/issues/8044#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fclerk%2Fjavascript%2Fissues%2F8044
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fclerk%2Fjavascript%2Fissues%2F8044
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=clerk%2Fjavascript
Reloadhttps://github.com/clerk/javascript/issues/8044
Reloadhttps://github.com/clerk/javascript/issues/8044
Reloadhttps://github.com/clerk/javascript/issues/8044
clerkhttps://github.com/clerk
javascripthttps://github.com/clerk/javascript
Codehttps://github.com/clerk/javascript
Issues45 (45)https://github.com/clerk/javascript/issues
Pull requests110 (110)https://github.com/clerk/javascript/pulls
Discussionshttps://github.com/clerk/javascript/discussions
Actionshttps://github.com/clerk/javascript/actions
Security and quality6 (6)https://github.com/clerk/javascript/security
Insightshttps://github.com/clerk/javascript/pulse
https://github.com/clerk/javascript
New issuehttps://github.com/login?return_to=https://github.com/clerk/javascript/issues/8044
New issuehttps://github.com/login?return_to=https://github.com/clerk/javascript/issues/8044
signIn.create({ strategy: 'ticket' }) silently fails when user has an active sessionhttps://github.com/clerk/javascript/issues/8044#top
Stalehttps://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3A%22Stale%22
https://github.com/pedrobarretocw
pedrobarretocwhttps://github.com/pedrobarretocw
on Mar 11, 2026https://github.com/clerk/javascript/issues/8044#issue-4059902733
custom flow documented herehttps://clerk.com/docs/guides/development/custom-flows/organizations/accept-organization-invitations
docs examplehttps://clerk.com/docs/guides/development/custom-flows/organizations/accept-organization-invitations
ryota-murakamihttps://github.com/ryota-murakami
on Mar 26, 2026https://github.com/clerk/javascript/issues/8044#event-23953592937
fix(oauth): always signOut before ticket to fix silent FAPI session c…https://github.com/laststance/corelive/commit/b0f2b198e335443147be63215b72b5834d19f076
b0f2b19https://github.com/laststance/corelive/commit/b0f2b198e335443147be63215b72b5834d19f076
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Apr 11, 2026https://github.com/clerk/javascript/issues/8044#issuecomment-4227406062
GitHub Actionshttps://help.github.com/en/actions
contributing guidehttps://github.com/clerk/javascript/blob/main/docs/CONTRIBUTING.md
github-actionshttps://github.com/apps/github-actions
Stalehttps://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3A%22Stale%22
on Apr 11, 2026https://github.com/clerk/javascript/issues/8044#event-24398481734
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Apr 21, 2026https://github.com/clerk/javascript/issues/8044#issuecomment-4285060305
GitHub Actionshttps://help.github.com/en/actions
contributing guidehttps://github.com/clerk/javascript/blob/main/docs/CONTRIBUTING.md
github-actionshttps://github.com/apps/github-actions
not plannedhttps://github.com/clerk/javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Apr 21, 2026https://github.com/clerk/javascript/issues/8044#event-24698979117
https://github.com/wmfrancismorgan
wmfrancismorganhttps://github.com/wmfrancismorgan
on Jul 30, 2026https://github.com/clerk/javascript/issues/8044#issuecomment-5125366830
#8219https://github.com/clerk/javascript/issues/8219
#8641https://github.com/clerk/javascript/pull/8641
https://github.com/hello-alejandro-1
hello-alejandro-1https://github.com/hello-alejandro-1
on Jul 30, 2026https://github.com/clerk/javascript/issues/8044#issuecomment-5133675368
Sign up for freehttps://github.com/signup?return_to=https://github.com/clerk/javascript/issues/8044
Sign in to commenthttps://github.com/login?return_to=https://github.com/clerk/javascript/issues/8044
Stalehttps://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3A%22Stale%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.