Skip to content

Commit

Permalink
Merge pull request #1275 from tennox/patch-1
Browse files Browse the repository at this point in the history
Add section about hash-mode routing
  • Loading branch information
pamapa authored Dec 1, 2023
2 parents b88ec90 + cc5b51f commit 5be2f00
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ mgr.signinRedirect({ url_state: 'custom url state' })
The `url_state` will be appended to the opaque, unique value created by the library when sending the request. It should survive the round trip to your authentication server and will be part of the [User](classes/User.html#url_state) object as `url_state`.


# Hash-mode router (SPA)
If your app is using hash-based routing, be aware that many OIDC providers append the query string after the hash instead of inserting it before:
**Correct:** `https://your.org/?code=ab&state=cd#/oidc-callback`
**Wrong:** `https://your.org/#/oidc-callback?code=ab&state=cd`

Check out [this issue]([https://github.com/authts/oidc-client-ts/issues/734#issuecomment-1298381823](https://github.com/authts/oidc-client-ts/issues/734)) for details. (There are also workarounds, as long as your provider doesn't fix the issue)

# Projects using oidc-client-ts

- [React context provider](https://github.com/authts/react-oidc-context)
Expand Down

0 comments on commit 5be2f00

Please sign in to comment.