You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a consumer provides handleResponse, they generally don't need to provide handleFetch:
// ERROR: missing property handleFetch// even though there is no need for it herenewTokenRefreshLink({fetchAccessToken: ()=>{constrefreshedSession=refreshSession();constfakeReq=newRequest('uri://fake');returnObject.assign(fakeReq,refreshedSession);},handleResponse: (_,__)=>response=>response.text().then(JSON.parse).then(res=>{saveToken(res.accessToken);}),},handleError: console.error,});
Expected behavior:
The constructor should enforce that at least one of handleFetch and handleResponse are present
The text was updated successfully, but these errors were encountered:
Hi, this code will fails because there is a check between handleResponse and handleFetch functions that expect to find a data we marked as accessTokenField, but I see your point. Originaly handleResponse was internal
I'm not sure the way you suggested will not confuse people, if we will mark handleFetch as an optional.
If a consumer provides
handleResponse
, they generally don't need to providehandleFetch
:Expected behavior:
The constructor should enforce that at least one of
handleFetch
andhandleResponse
are presentThe text was updated successfully, but these errors were encountered: