Skip to content

Next.JS 14.1.0 and azure/msal... relaods too much and never authenticate #61960

@FrancisBoudreau

Description

@FrancisBoudreau

Link to the code that reproduces this issue

https://github.com/FrancisBoudreau/bogue-reproduction-app

To Reproduce

  1. I updated the v14.0.3 to the v 14.1.0 and after I got a import { useRouter } from "next/navigation" ERROR,
  2. Deleted the line and put it back and the error disapeared.
  3. Lauched the dev and the page was reloading many times untel MS login display message that it can't log in.
  4. Dowgraded back to v 14.0.3, Next and msal authication working again like suposed to.

Current vs. Expected behavior

realoding in a loop,
should login with msale.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Education
Binaries:
  Node: 20.10.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.1.0
  eslint-config-next: 14.1.0
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: export

Which area(s) are affected? (Select all that apply)

Not sure, App Router, Routing (next/router, next/navigation, next/link)

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

I tested my reproduction against different canary releases, and the first one that introduced the bug was 14.0.5-canary.54, reverting to 14.0.5-canary.53 workds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Linking and NavigatingRelated to Next.js linking (e.g., <Link>) and navigation.bugIssue was opened via the bug report template.staleThe issue has not seen recent activity.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions