Unable to disable redirect when using custom signout flow
Closed this issue · 0 comments
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 have, no need to open an issue here)
-
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.
Reproduction
my-repo-is-private
Publishable key
pk_test_b24tbGFicmFkb3ItNTkuY2xlcmsuYWNjb3VudHMuZGV2JA
Description
Steps to reproduce:
- Step 1: Use custom signout function:
const { signOut } = useClerk();
await signOut({ redirectUrl: undefined }).then(() => null);
- Step 2
Expected behavior:
Dont redirect if no redirect url is present.
Actual behavior:
Redirects to / if no URL is present.
It's very weird first of all that the forgot password cannot work in a logged in session, make zero sense. Therefore i have to logout the user right before making a password reset request, which doesn't work since i get redirected. If you have a solution to not get redirected when logged out great, could you please provide that.
Environment
System:
OS: macOS 14.4
CPU: (11) arm64 Apple M3 Pro
Memory: 127.02 MB / 18.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
Yarn: 1.22.21 - /opt/homebrew/bin/yarn
npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
Watchman: 2024.05.06.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 125.0.6422.76
Edge: 125.0.2535.51
Safari: 17.4
npmPackages:
@aws-sdk/client-s3: ^3.576.0 => 3.577.0
@aws-sdk/s3-request-presigner: ^3.576.0 => 3.577.0
@clerk/nextjs: 5.0.10 => 5.0.10
@commitlint/cli: ^19.3.0 => 19.3.0
@commitlint/config-conventional: ^19.2.2 => 19.2.2
@commitlint/cz-commitlint: ^19.2.0 => 19.2.0
@hookform/resolvers: ^3.4.0 => 3.4.2
@next/bundle-analyzer: ^14.2.3 => 14.2.3
@next/env: ^14.2.3 => 14.2.3
@percy/cli: ^1.28.6 => 1.28.6
@percy/cypress: ^3.1.2 => 3.1.2
@prisma/client: ^5.14.0 => 5.14.0
@prisma/extension-accelerate: ^1.0.0 => 1.0.0
@radix-ui/react-switch: ^1.0.3 => 1.0.3
@semantic-release/changelog: ^6.0.3 => 6.0.3
@semantic-release/git: ^10.0.1 => 10.0.1
@sentry/nextjs: ^7.114.0 => 7.116.0
@storybook/addon-essentials: ^7.6.19 => 7.6.19
@storybook/addon-interactions: ^7.6.19 => 7.6.19
@storybook/addon-links: ^7.6.19 => 7.6.19
@storybook/blocks: ^7.6.19 => 7.6.19
@storybook/nextjs: ^7.6.19 => 7.6.19
@storybook/react: ^7.6.19 => 7.6.19
@storybook/test-runner: ^0.18.0 => 0.18.1
@storybook/testing-library: ^0.2.2 => 0.2.2
@svgr/webpack: ^8.1.0 => 8.1.0
@tanstack/react-query: ^4.36.1 => 4.36.1
@tanstack/react-table: ^8.17.3 => 8.17.3
@testing-library/cypress: ^10.0.1 => 10.0.1
@testing-library/jest-dom: ^6.4.5 => 6.4.5
@testing-library/react: ^15.0.7 => 15.0.7
@trpc/client: ^10.45.2 => 10.45.2
@trpc/next: ^10.45.2 => 10.45.2
@trpc/react-query: ^10.45.2 => 10.45.2
@trpc/server: ^10.45.2 => 10.45.2
@types/google.maps: ^3.55.8 => 3.55.9
@types/jest: ^29.5.12 => 29.5.12
@types/node: ^20.12.12 => 20.12.12
@types/react: ^18.3.2 => 18.3.2
@types/resize-observer-browser: ^0.1.11 => 0.1.11
@types/uuid: ^9.0.8 => 9.0.8
@typescript-eslint/eslint-plugin: ^7.9.0 => 7.10.0
@typescript-eslint/parser: ^7.9.0 => 7.10.0
autoprefixer: ^10.4.19 => 10.4.19
axios: ^1.6.8 => 1.7.1
bullmq: ^5.7.1 => 5.7.10
classnames: ^2.5.1 => 2.5.1
commitizen: ^4.3.0 => 4.3.0
concurrently: ^8.2.2 => 8.2.2
cookies-next: ^4.1.1 => 4.1.1
cross-env: ^7.0.3 => 7.0.3
cssnano: ^7.0.1 => 7.0.1
cypress: ^13.9.0 => 13.9.0
date-fns: ^3.6.0 => 3.6.0
dayjs: ^1.11.11 => 1.11.11
dotenv: ^16.4.5 => 16.4.5
dotenv-cli: ^7.4.2 => 7.4.2
eslint: ^8.57.0 => 8.57.0
eslint-config-airbnb: ^19.0.4 => 19.0.4
eslint-config-airbnb-typescript: ^18.0.0 => 18.0.0
eslint-config-next: ^14.2.3 => 14.2.3
eslint-config-prettier: ^9.1.0 => 9.1.0
eslint-plugin-cypress: ^3.2.0 => 3.2.0
eslint-plugin-import: ^2.29.1 => 2.29.1
eslint-plugin-jest: ^28.5.0 => 28.5.0
eslint-plugin-jest-dom: ^5.4.0 => 5.4.0
eslint-plugin-jest-formatting: ^3.1.0 => 3.1.0
eslint-plugin-prettier: ^5.1.3 => 5.1.3
eslint-plugin-react: ^7.34.1 => 7.34.1
eslint-plugin-react-hooks: ^4.6.2 => 4.6.2
eslint-plugin-simple-import-sort: ^12.1.0 => 12.1.0
eslint-plugin-storybook: ^0.8.0 => 0.8.0
eslint-plugin-testing-library: ^6.2.2 => 6.2.2
eslint-plugin-tsdoc: ^0.2.17 => 0.2.17
eslint-plugin-unused-imports: ^3.2.0 => 3.2.0
flickity: 2.3.0 => 2.3.0
framer-motion: ^11.2.0 => 11.2.4
http-server: ^14.1.1 => 14.1.1
husky: ^9.0.11 => 9.0.11
i18next: ^23.11.4 => 23.11.5
identity-obj-proxy: ^3.0.0 => 3.0.0
ioredis: ^5.4.0 => 5.4.1
jest: ^29.7.0 => 29.7.0
jest-environment-jsdom: ^29.7.0 => 29.7.0
jest-fetch-mock: ^3.0.3 => 3.0.3
lint-staged: ^15.2.2 => 15.2.2
mime-types: ^2.1.35 => 2.1.35
mongoose: ^8.3.5 => 8.4.0
next: 14.2.3 => 14.2.3
next-seo: ^6.5.0 => 6.5.0
next-sitemap: ^4.2.3 => 4.2.3
next-translate: ^2.6.2 => 2.6.2
next-translate-plugin: ^2.6.2 => 2.6.2
npm-run-all: ^4.1.5 => 4.1.5
postcss: ^8.4.38 => 8.4.38
prettier: ^3.2.5 => 3.2.5
prisma: ^5.14.0 => 5.14.0
puppeteer: ^22.7.0 => 22.9.0
react: ^18.2.0 => 18.3.1
react-canvas-confetti: ^2.0.7 => 2.0.7
react-day-picker: ^8.10.1 => 8.10.1
react-dom: ^18.2.0 => 18.3.1
react-dropzone: ^14.2.3 => 14.2.3
react-flickity-component: ^4.0.7 => 4.0.7
react-hook-form: ^7.51.4 => 7.51.4
react-intersection-observer: ^9.10.2 => 9.10.2
react-loader-spinner: ^6.1.6 => 6.1.6
react-otp-input: ^3.1.1 => 3.1.1
react-responsive-carousel: ^3.2.23 => 3.2.23
react-select: ^5.8.0 => 5.8.0
react-toastify: ^10.0.5 => 10.0.5
recharts: ^2.12.7 => 2.12.7
resize-observer-polyfill: ^1.5.1 => 1.5.1
rimraf: ^5.0.7 => 5.0.7
sass: ^1.77.1 => 1.77.2
sharp: ^0.32.6 => 0.32.6
start-server-and-test: ^2.0.3 => 2.0.3
storybook: ^7.6.19 => 7.6.19
superjson: ^1.13.3 => 1.13.3
ts-jest: ^29.1.2 => 29.1.3
tsconfig-paths: ^4.2.0 => 4.2.0
tsx: ^4.7.2 => 4.10.5
typed-scss-modules: ^8.0.1 => 8.0.1
typescript: ^5.4.5 => 5.4.5
use-places-autocomplete: ^4.0.1 => 4.0.1
uuid: ^9.0.1 => 9.0.1
zod: ^3.23.8 => 3.23.8
zod-i18n-map: ^2.27.0 => 2.27.0