Skip to content

Commit

Permalink
Merge branch 'master' into STCOR-926
Browse files Browse the repository at this point in the history
  • Loading branch information
zburke authored Jan 9, 2025
2 parents a7467d1 + 2f75d43 commit 6fc0777
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Don't override initial discovery and okapi data in test mocks. Refs STCOR-913.
* `<Logout>` must consume `QueryClient` in order to supply it to `loginServices::logout()`. Refs STCOR-907.
* On resuming session, spread session and `_self` together to preserve session values. Refs STCOR-912.
* Fetch `/saml/check` when starting a new session, i.e. before discovery. Refs STCOR-933, STCOR-816.

## [10.2.0](https://github.com/folio-org/stripes-core/tree/v10.2.0) (2024-10-11)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.1.1...v10.2.0)
Expand Down
7 changes: 5 additions & 2 deletions src/loginServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -851,8 +851,11 @@ export function checkOkapiSession(okapiUrl, store, tenant) {
.then((sess) => {
return sess?.user?.id ? validateUser(okapiUrl, store, tenant, sess) : null;
})
.then(() => {
if (store.getState().discovery?.interfaces?.['login-saml']) {
.then((res) => {
// check whether SSO is enabled if either
// 1. res is null (when we are starting a new session)
// 2. login-saml interface is present (when we are resuming an existing session)
if (!res || store.getState().discovery?.interfaces?.['login-saml']) {
return getSSOEnabled(okapiUrl, store, tenant);
}
return Promise.resolve();
Expand Down

0 comments on commit 6fc0777

Please sign in to comment.