Skip to content

React-router (hash routing) is not working directly after login #8845

@stefan-li-avepoint

Description

@stefan-li-avepoint

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

None

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version
  • SPFx version
  • Node.js version
  • etc

Describe the bug / error

I have the same issue, how is it resolved and in what version?

Steps to reproduce

Open a browser where you are already logged-in to SharePoint Online, everything is working as expected.
If you are not already logged-in to SharePoint Online, the call to Page.aspx#/my/route/1 redirects you to login.microsoftonline.com. After logging in, you are redirected back to Page.aspx but without the hash route.

Expected behavior

I have an SPFx 1.13.0 web part which uses react hash routing. So you can open the page with a specific route to navigate to a specific part within the web part. E.g. Page.aspx#/my/route/1
It shoud be possible to open the link directly, for example from an email.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:spfxCategory: SharePoint Framework (not extensions related)type:archive-old-issueIssues which are closed as tool old for active worktype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions