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

Fixes an infinite loop issue when third-part sites are requesting auth resources

parent 51f5ab29
No related branches found
No related tags found
No related merge requests found
......@@ -369,23 +369,5 @@ describe('IIIF Authentication sagas', () => {
})
.run();
});
it('marks the auth service as failed if the auth token was not successfully used', () => {
const authId = 'authId';
const serviceId = 'serviceId';
return expectSaga(invalidateInvalidAuth, { serviceId })
.provide([
[select(getAccessTokens), { [serviceId]: { authId, id: serviceId } }],
[select(getAuth), { [authId]: { id: authId } }],
])
.put({
id: authId,
ok: false,
tokenServiceId: serviceId,
type: ActionTypes.RESOLVE_AUTHENTICATION_REQUEST,
})
.run();
});
});
});
......@@ -139,14 +139,6 @@ export function* invalidateInvalidAuth({ serviceId }) {
authServiceId: authService.id,
tokenServiceId: accessTokenService.id,
}));
} else {
// if the token never worked, mark the auth service as bad so we could
// try to pick a different service
yield put(resolveAuthenticationRequest(
authService.id,
accessTokenService.id,
{ ok: false },
));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment