Skip to content

forceRedirectUrl is not working when using SignInButton #3325

Description

@spacecat

Preliminary Checks

Reproduction

https://github.com/spacecat/clerk-01

Publishable key

pk_test_ZXhvdGljLXJhYmJpdC00MC5jbGVyay5hY2NvdW50cy5kZXYk

Description

Steps to reproduce:
In Google Chrome:

  1. Follow https://clerk.com/docs/quickstarts/nextjs
  2. Create some routes, e.g. /dashboard, /dashboard/blog. These are included in the repo.
  3. Configure your sign in button like this: ``
  4. Navigate to /dashboard
  5. Click on the "Sign in" link
  6. Log in using google

For more info: https://discord.com/channels/856971667393609759/1236251832763023420

Expected behavior:

You should end up at /dashboard/blog

Actual behavior:

You end up at /dashboard

Environment

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M1
    Memory: 274.34 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
    bun: 1.0.13 - ~/.bun/bin/bun
  Browsers:
    Chrome: 124.0.6367.119
    Safari: 17.4.1
  npmPackages:
    @clerk/nextjs: ^5.0.6 => 5.0.6
    @types/node: ^20 => 20.12.8
    @types/react: ^18 => 18.3.1
    @types/react-dom: ^18 => 18.3.0
    eslint: ^8 => 8.57.0
    eslint-config-next: 14.2.3 => 14.2.3
    next: 14.2.3 => 14.2.3
    postcss: ^8 => 8.4.38
    react: ^18 => 18.3.1
    react-dom: ^18 => 18.3.1
    tailwindcss: ^3.4.1 => 3.4.3
    typescript: ^5 => 5.4.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions