Skip to content

Commit

Permalink
Revert "STCOR-853 do not include credential in /authn/token request (#…
Browse files Browse the repository at this point in the history
…1480)" (#1486)

This reverts commit d6e7af8.

We don't want to _send_ old cookies, but we do want to _receive_ new
cookies. `omit` ignores both. From
https://developer.mozilla.org/en-US/docs/Web/API/fetch#credentials:

> `omit`: Tells browsers to exclude credentials from the request, and
> ignore any credentials sent back in the response (e.g., any Set-Cookie
> header).

We may still have a cookie exchange problem, but if we do, `credentials:
"omit"` won't solve it.
  • Loading branch information
zburke committed May 30, 2024
1 parent d6e7af8 commit 13001bf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 87 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* Idle-session timeout and "Keep working?" modal. Refs STCOR-776.
* Use keycloak URLs in place of users-bl for tenant-switch. Refs US1153537.
* Fix 404 error page when logging in after changing password in Eureka. Refs STCOR-845.
* Omit credentials in requests to `/authn/token` to prevent redirect tailspin. Refs STCOR-853.

## [10.1.1](https://github.com/folio-org/stripes-core/tree/v10.1.1) (2024-03-25)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.1.0...v10.1.1)
Expand Down
2 changes: 1 addition & 1 deletion src/components/OIDCLanding.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const OIDCLanding = () => {
if (otp) {
setPotp(otp);
fetch(`${okapi.url}/authn/token?code=${otp}&redirect-uri=${window.location.protocol}//${window.location.host}/oidc-landing`, {
credentials: 'omit',
credentials: 'include',
headers: { 'X-Okapi-tenant': okapi.tenant, 'Content-Type': 'application/json' },
mode: 'cors',
})
Expand Down
85 changes: 0 additions & 85 deletions src/components/OIDCLanding.test.js

This file was deleted.

0 comments on commit 13001bf

Please sign in to comment.