Skip to content

Commit cc5b51f

Browse files
authored
Add section about hash-mode routing
After submitting #1270 I guess this is the way to go
1 parent b88ec90 commit cc5b51f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ mgr.signinRedirect({ url_state: 'custom url state' })
133133
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`.
134134

135135

136+
# Hash-mode router (SPA)
137+
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:
138+
**Correct:** `https://your.org/?code=ab&state=cd#/oidc-callback`
139+
**Wrong:** `https://your.org/#/oidc-callback?code=ab&state=cd`
140+
141+
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)
142+
136143
# Projects using oidc-client-ts
137144

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

0 commit comments

Comments
 (0)