Repository navigation
Don't crash when encountering mixed auth v1/v2 info.json - #4622
Conversation
AuthProbeService2 has no profile, so the old code threw TypeError: Cannot read properties of undefined (reading 'match'). With the guard, the v2 service drops out of the filter and the v1 token lookup runs as before.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4622 +/- ##
=====================================
Coverage 94.9% 94.9%
=====================================
Files 394 394
Lines 5850 5850
Branches 2002 2003 +1
=====================================
Hits 5550 5550
Misses 271 271
Partials 29 29 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@jcoyne on this branch one part of the /auth demo page stops working On your branch:
This is the manifest, which provides an Auth2 probe as well as an Auth0 cookie service. If you can confirm that you also are missing the Content Warning login bar on this branch, I think we should make sure that stays in. |
|
So, the main branch behavior seems to depend on this crash occurring:
the saga then dies, and the degraded info response never gets saved With nothing saved, selectCurrentAuthServices (src/state/selectors/auth.js:57-63) falls back to the image service embedded in the manifest. That one says "profile": "http://iiif.io/api/auth/0/clickthrough", which is in auth.serviceProfiles, so the content warning bar shows. It looks like the Wellcome manifest is using auth v0. (see presentation/v2/b19319174). The manifest says |
|
@marlo-longley it looks like that auth page is broken on main: #4623 |



AuthProbeService2 has no profile, so the old code threw
TypeError: Cannot read properties of undefined (reading 'match'). With the guard, the v2 service drops out of the filter and the v1 token lookup runs as before.