Skip to content
Snippets Groups Projects
Commit e9b7e983 authored by Jack Reed's avatar Jack Reed
Browse files

Update profile as its a string instead of an object with a value property

parent a232b773
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment