Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const wrapAuthenticating = (fetch = undefined) => props => {
const previousFetch = fetch || props.fetch;
const trySilentAuthenticateInjected = signinSilent(getUserManager);
const newFetch = fetchWithSilentAuthenticateAndRetryOn401(
previousFetch,
trySilentAuthenticateInjected
);
const newProps = {
fetch: newFetch,
};
return newProps;
};