diff --git a/src/components/WindowAuthenticationControl.js b/src/components/WindowAuthenticationControl.js index 87f70ab727708b9cc8f5300c29c5e81f5956bf91..97c33a4596e5735b557e1a7d8eee2646db9d535d 100644 --- a/src/components/WindowAuthenticationControl.js +++ b/src/components/WindowAuthenticationControl.js @@ -50,7 +50,7 @@ export class WindowAuthenticationControl extends Component { profile, } = this.props; - return profile.value === 'http://iiif.io/api/auth/1/clickthrough' || profile.value === 'http://iiif.io/api/auth/1/login'; + return profile === 'http://iiif.io/api/auth/1/clickthrough' || profile === 'http://iiif.io/api/auth/1/login'; } /** */ @@ -149,7 +149,7 @@ WindowAuthenticationControl.propTypes = { header: PropTypes.string, infoId: PropTypes.string, label: PropTypes.string, - profile: PropTypes.shape({ value: PropTypes.string }), + profile: PropTypes.string, serviceId: PropTypes.string, status: PropTypes.oneOf(['ok', 'fetching', 'failed', null]), t: PropTypes.func, diff --git a/src/state/actions/infoResponse.js b/src/state/actions/infoResponse.js index 22cd9c0f88b799bab8a6f8c5a51f4c04a30ba64b..2e0af3d6b43ff113eaf6f2982ef35002294400f8 100644 --- a/src/state/actions/infoResponse.js +++ b/src/state/actions/infoResponse.js @@ -49,7 +49,7 @@ export function receiveInfoResponseFailure(infoId, error) { function getAccessToken({ accessTokens }, iiifService) { if (!iiifService) return undefined; - const services = Utils.getServices(iiifService).filter(s => s.getProfile().value.match(/http:\/\/iiif.io\/api\/auth\/1\//)); + const services = Utils.getServices(iiifService).filter(s => s.getProfile().match(/http:\/\/iiif.io\/api\/auth\/1\//)); for (let i = 0; i < services.length; i += 1) { const authService = services[i];