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
Domain: github.com
{"@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-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fd360aa1-81b7-1499-e676-095c6432b2f9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8170:277BD5:10C8043:16F401C:6AFB6766 |
| html-safe-nonce | 55d72bb5651f1d55203f8078603fb379979eb22a75c09d5924166c2ba57b5fa1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTcwOjI3N0JENToxMEM4MDQzOjE2RjQwMUM6NkFGQjY3NjYiLCJ2aXNpdG9yX2lkIjoiMzcyNTc1MzE3NzUyMjAwNTg2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1c32b59eeba6a1ed005784bfcbde555453c5c98a519dffa3654cc5dc66b25acd |
| hovercard-subject-tag | issue:4059902733 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/clerk/javascript/8044/issue_layout |
| twitter:image | https://opengraph.githubassets.com/50523e7292ffde78edaab857475e2535d25e9b121b0fb5154964c95c5a6ad685/clerk/javascript/issues/8044 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/50523e7292ffde78edaab857475e2535d25e9b121b0fb5154964c95c5a6ad685/clerk/javascript/issues/8044 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pedrobarretocw |
| hostname | github.com |
| expected-hostname | github.com |
| None | ea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94 |
| turbo-cache-control | no-preview |
| go-import | github.com/clerk/javascript git https://github.com/clerk/javascript.git |
| octolytics-dimension-user_id | 49538330 |
| octolytics-dimension-user_login | clerk |
| octolytics-dimension-repository_id | 438331492 |
| octolytics-dimension-repository_nwo | clerk/javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 438331492 |
| octolytics-dimension-repository_network_root_nwo | clerk/javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ef97164c52cf59bd10558ddec9c4f482763988 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width