Skip to content

no redirection after successful loginΒ #10016

@78raoul78

Description

@78raoul78

Environment

System:
OS: macOS 14.1.2
CPU: (8) arm64 Apple M2
Memory: 489.31 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.7.0 - /opt/homebrew/bin/node
Yarn: 1.22.21 - /opt/homebrew/bin/yarn
npm: 10.1.0 - /opt/homebrew/bin/npm
pnpm: 8.14.0 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 121.0.6167.160
Safari: 17.1.2
npmPackages:
next: 14.1.0 => 14.1.0
react: 18.2.0 => 18.2.0

Reproduction URL

https://github.com/78raoul78/ui

Describe the issue

After a successful signIn, I'm not getting redirected to my home page even though the callbackUrl is correctly set.

How to reproduce

  1. Checkout the repository
  2. Create an .env file in apps/www and paste inside the content from app/www/.env.example (put your own AUTH_SECRET and the url of your POSTGRES_URL)
  3. Go to apps/www and run pnpm install
  4. then pnpm run seed
  5. then pnpm build
  6. then pnpm dev
  7. Go to http://localhost:3001
  8. You should be redirected to the signIn page http://localhost:3001/signIn?callbackUrl=http%3A%2F%2Flocalhost%3A3001%2F
  9. submit a valid account credentials : [email protected] / 123456
  10. here is the issue : instead of being redirected to http://localhost:3001, you're being redirected to http://localhost:3001/signIn?callbackUrl=http%3A%2F%2Flocalhost%3A3001%2F , whats the interest of the callbackUrl if I'm not redirected to it πŸ€”

Expected behavior

After a successful login, I'm expecting to be redirected to the initial url (the one before the redirection) which is localhost:3001

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions