Title: redirect_url is appended after signing out · Issue #5590 · clerk/javascript · GitHub
Open Graph Title: redirect_url is appended after signing out · Issue #5590 · clerk/javascript
X Title: redirect_url is appended after signing out · Issue #5590 · clerk/javascript
Description: Preliminary Checks I have reviewed the documentation: https://clerk.com/docs I have searched for existing issues: https://github.com/clerk/javascript/issues I have not already reached out to Clerk support via email or Discord (if you hav...
Open Graph Description: Preliminary Checks I have reviewed the documentation: https://clerk.com/docs I have searched for existing issues: https://github.com/clerk/javascript/issues I have not already reached out to Clerk ...
X Description: Preliminary Checks I have reviewed the documentation: https://clerk.com/docs I have searched for existing issues: https://github.com/clerk/javascript/issues I have not already reached out to Clerk ...
Opengraph URL: https://github.com/clerk/javascript/issues/5590
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"redirect_url is appended after signing out","articleBody":"### Preliminary Checks\n\n- [x] I have reviewed the documentation: https://clerk.com/docs\n\n- [x] I have searched for existing issues: https://github.com/clerk/javascript/issues\n\n- [x] I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)\n\n- [x] This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.\n\n\n### Reproduction\n\nhttps://github.com/clerk/clerk-react-quickstart\n\n### Publishable key\n\npk_test_cHJvdmVuLWdsaWRlci04Mi5jbGVyay5hY2NvdW50cy5kZXYk\n\n### Description\n\n\u003c!-- Be as precise as you can. Feel free to share screenshots, videos, or data from the devtools of your browser -->\n\n**Steps to reproduce:**\n\nUsing `@clerk/react` version `^5.26.2` on a SPA React app with React Router 6.26.0\n\n1. While signed-in, navigate to any page inside the app (i.e. `/the/url/before/signing/out`)\n2. Hard refresh\n3. Sign out (tried with `signOut()`, `signOut({ redirectUrl: '' })`, `signOut({ redirectUrl: '/sign-in' })` and `signOut({ redirectUrl: '/' })`\n4. You land on the sign-in page but have query param `redirect_url=/the/url/before/signing/out` (as well as `sign_in_fallback_redirect_url`, `sign_up_force_redirect_url`, etc.)\n\nWeird thing is that this does not happen if I do not refresh.\n\n**Expected behavior:**\n\nRedirect to sign in page without any query params.\n\nWhen signing in I do not expect to land on the page I was when I signed-out. Another user might sign in and land on a page which might give them an error/404/forbidden.\n\nOn the other hand I understand that [as per documentation](https://clerk.com/docs/guides/custom-redirects) and would expect if I visit /users/123/details while signed out, to get the redirect url and be redirected to that after signing in.\n\n**Actual behavior:**\n\nRedirected to sign-in with query params set (esp. redirect_url=/the/url/before/signing/out)\n\n\nThis is also reproducible with https://github.com/clerk/clerk-react-quickstart\n\n\n### Environment\n\n```Shell\nSystem:\n OS: macOS 15.4\n CPU: (12) arm64 Apple M2 Max\n Memory: 85.14 MB / 32.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 20.18.1 - ~/.local/state/fnm_multishells/12907_1744287998041/bin/node\n npm: 11.1.0 - ~/.local/state/fnm_multishells/12907_1744287998041/bin/npm\n pnpm: 10.6.5 - ~/Library/pnpm/pnpm\n Watchman: 2025.03.10.00 - /opt/homebrew/bin/watchman\n Browsers:\n Chrome: 135.0.7049.84\n Safari: 18.4\n npmPackages:\n @0no-co/graphqlsp: ^1.12.6 => 1.12.16\n @apollo/client: ^3.11.2 => 3.11.8\n @apollo/sandbox: ^2.6.0 => 2.7.0\n @clerk/clerk-react: ^5.26.2 => 5.26.2\n @clerk/themes: ^2.1.15 => 2.1.39\n @daily-co/daily-js: ^0.72.1 => 0.72.1\n @daily-co/daily-react: ^0.21.2 => 0.21.2\n @datadog/browser-logs: ^5.23.3 => 5.29.0\n @dnd-kit/core: ^6.1.0 => 6.1.0\n @dnd-kit/modifiers: ^7.0.0 => 7.0.0\n @dnd-kit/sortable: ^8.0.0 => 8.0.0\n @dnd-kit/utilities: ^3.2.2 => 3.2.2\n @fortawesome/fontawesome-svg-core: ^6.6.0 => 6.6.0\n @fortawesome/free-brands-svg-icons: ^6.6.0 => 6.6.0\n @fortawesome/free-regular-svg-icons: ^6.6.0 => 6.6.0\n @fortawesome/free-solid-svg-icons: ^6.6.0 => 6.6.0\n @fortawesome/pro-duotone-svg-icons: ^6.6.0 => 6.6.0\n @fortawesome/pro-light-svg-icons: ^6.6.0 => 6.6.0\n @fortawesome/pro-regular-svg-icons: ^6.6.0 => 6.6.0\n @fortawesome/pro-solid-svg-icons: ^6.6.0 => 6.6.0\n @fortawesome/pro-thin-svg-icons: ^6.6.0 => 6.6.0\n @fortawesome/react-fontawesome: ^0.2.2 => 0.2.2\n @fortawesome/sharp-light-svg-icons: ^6.6.0 => 6.6.0\n @fortawesome/sharp-regular-svg-icons: ^6.6.0 => 6.6.0\n @fortawesome/sharp-solid-svg-icons: ^6.6.0 => 6.6.0\n @fortawesome/sharp-thin-svg-icons: ^6.6.0 => 6.6.0\n @gql.tada/cli-utils: ^1.6.3 => 1.6.3\n @hookform/resolvers: ^3.9.0 => 3.9.0\n @ianvs/prettier-plugin-sort-imports: ^4.3.1 => 4.3.1\n @tailwindcss/container-queries: ^0.1.1 => 0.1.1\n @tanstack/react-table: ^8.19.3 => 8.20.5\n @testing-library/jest-dom: ^6.6.3 => 6.6.3\n @testing-library/react: ^16.2.0 => 16.2.0\n @testing-library/user-event: ^14.6.1 => 14.6.1\n @total-typescript/ts-reset: ^0.5.1 => 0.5.1\n @types/luxon: ^3.4.2 => 3.4.2\n @types/node: ^20.17.0 => 20.17.0\n @types/react: ^18.3.3 => 18.3.12\n @types/react-copy-to-clipboard: ^5.0.7 => 5.0.7\n @types/react-dom: ^18.3.0 => 18.3.1\n @types/react-syntax-highlighter: ^15.5.13 => 15.5.13\n @types/validator: ^13.12.2 => 13.12.2\n @typescript-eslint/eslint-plugin: ^8.21.0 => 8.21.0\n @typescript-eslint/parser: ^8.21.0 => 8.21.0\n @vitejs/plugin-legacy: ^5.4.3 => 5.4.3\n @vitejs/plugin-react-swc: ^3.7.0 => 3.7.1\n @wiserwork/tailwind-config: workspace:* => 0.0.0\n @wiserwork/ui: workspace:* => 0.0.1\n autoprefixer: ^10.4.19 => 10.4.20\n axios: ^1.7.4 => 1.7.7\n class-variance-authority: ^0.7.0 => 0.7.0\n clsx: ^2.1.1 => 2.1.1\n cmdk: ^1.0.0 => 1.0.0\n crisp-sdk-web: ^1.0.25 => 1.0.25\n date-fns: ^3.6.0 => 3.6.0\n dedent: ^1.5.3 => 1.5.3\n dotenv: ^16.4.5 => 16.4.5\n eslint: ^8.57.0 => 8.57.1\n framer-motion: ^11.3.21 => 11.11.9\n gql.tada: ^1.8.5 => 1.8.10\n graphql: ^16.9.0 => 16.9.0\n graphql-ws: ^5.16.0 => 5.16.0\n jotai: ^2.10.0 => 2.10.1\n jsdom: ^26.0.0 => 26.0.0\n localforage: ^1.10.0 => 1.10.0\n lucide-react: ^0.428.0 => 0.428.0\n luxon: ^3.5.0 => 3.5.0\n match-sorter: ^6.3.4 => 6.4.0\n next-themes: ^0.3.0 => 0.3.0\n postcss: ^8.4.40 => 8.4.47\n posthog-js: ^1.219.1 => 1.219.1\n prettier: ^3.3.3 => 3.3.3\n prettier-plugin-tailwindcss: ^0.6.8 => 0.6.8\n react: ^18.2.0 => 18.3.1\n react-cookie-consent: ^9.0.0 => 9.0.0\n react-copy-to-clipboard: ^5.1.0 => 5.1.0\n react-day-picker: ^8.10.1 => 8.10.1\n react-dom: ^18.2.0 => 18.3.1\n react-helmet-async: ^2.0.5 => 2.0.5\n react-hook-form: ^7.52.1 => 7.53.1\n react-markdown: ^9.0.1 => 9.0.1\n react-resizable-panels: ^2.0.22 => 2.1.5\n react-router-dom: ^6.26.0 => 6.27.0\n react-spinners: ^0.14.1 => 0.14.1\n react-textarea-autosize: ^8.5.3 => 8.5.4\n react-timezone-select: ^3.2.8 => 3.2.8\n recoil: ^0.7.7 => 0.7.7\n remark-gfm: ^4.0.0 => 4.0.0\n remark-math: ^6.0.0 => 6.0.0\n remark-supersub: ^1.0.0 => 1.0.0\n rimraf: ^6.0.1 => 6.0.1\n socket.io-client: ^4.7.5 => 4.8.0\n sonner: ^1.5.0 => 1.5.0\n sort-by: ^1.2.0 => 1.2.0\n tailwind-merge: ^2.4.0 => 2.5.4\n tailwindcss: ^3.4.7 => 3.4.14\n tsx: ^4.16.5 => 4.19.1\n type-fest: ^4.23.0 => 4.26.1\n typescript: ^5.7.2 => 5.7.3\n unplugin-fonts: ^1.1.1 => 1.1.1\n use-debounce: ^10.0.2 => 10.0.4\n validator: ^13.12.0 => 13.12.0\n vite: ^5.3.5 => 5.4.10\n vite-tsconfig-paths: ^5.0.1 => 5.0.1\n vitest: ^3.0.3 => 3.0.3\n zod: ^3.23.8 => 3.23.8\n```","author":{"url":"https://github.com/xeroxoid","@type":"Person","name":"xeroxoid"},"datePublished":"2025-04-10T18:47:15Z","url":"https://github.com/clerk/javascript/issues/5590"}
| 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:18adf780-ecf0-b6fe-9dff-89b8efd20bd4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C126:27DCD7:1239CAC:18DADE6:6AFB6A08 |
| html-safe-nonce | cbc500d8ffe8a990d93336d69c5a2a745ac2e83916180549183ff3b13464e96d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTI2OjI3RENENzoxMjM5Q0FDOjE4REFERTY6NkFGQjZBMDgiLCJ2aXNpdG9yX2lkIjoiNDYxNjU2OTY3MjkxNTcwODQyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 358dd28586fcb500c11f0d6d21fb2a2e9ada1c0105075b31928e1dd0e5bddf70 |
| hovercard-subject-tag | issue:2986577627 |
| 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/5590/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f7901fe92052e909a3246b2bd1bd6ffde06249380b08145bec8a2c103c123874/clerk/javascript/issues/5590 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f7901fe92052e909a3246b2bd1bd6ffde06249380b08145bec8a2c103c123874/clerk/javascript/issues/5590 |
| og:image:alt | Preliminary Checks I have reviewed the documentation: https://clerk.com/docs I have searched for existing issues: https://github.com/clerk/javascript/issues I have not already reached out to Clerk ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | xeroxoid |
| 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