From e9b7e9832fdbee08c725ea89f39a46342c1cc0ad Mon Sep 17 00:00:00 2001
From: Jack Reed <phillipjreed@gmail.com>
Date: Wed, 9 Oct 2019 07:36:23 -0600
Subject: [PATCH] Update profile as its a string instead of an object with a
 value property

---
 src/components/WindowAuthenticationControl.js | 4 ++--
 src/state/actions/infoResponse.js             | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/components/WindowAuthenticationControl.js b/src/components/WindowAuthenticationControl.js
index 87f70ab72..97c33a459 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 22cd9c0f8..2e0af3d6b 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];
-- 
GitLab