🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-native-simple-networking

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-simple-networking - npm Package Compare versions

Comparing version

to
1.0.61

5

lib/networking/createAxiosClient.js

@@ -176,4 +176,7 @@ "use strict";

if ('response' in error && error.response && (attemptRefreshOnStatusCodes.includes(error.response.status))) {
if (!authStore.getState().refreshToken)
if (!authStore.getState().refreshToken) {
logAxiosError(error);
throw error;
}
;
return await onUnauthorizedRequest(error.config);

@@ -180,0 +183,0 @@ }

2

package.json
{
"name": "react-native-simple-networking",
"version": "1.0.60",
"version": "1.0.61",
"description": "This is a package that implements authentication state using zustand tied to axios interceptors in order to automatically add an 'authorization' header to all requests any time a request is sent with the created axios client. It also provides some basic request logging. The package will attempt to refresh any time an access token is expired, stalling all requests any time a token refresh is going on. ",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -199,3 +199,6 @@ import axios, { AxiosError, AxiosRequestConfig } from "axios";

if ('response' in error && error.response && (attemptRefreshOnStatusCodes.includes(error.response.status))) {
if(!authStore.getState().refreshToken) throw error;
if(!authStore.getState().refreshToken) {
logAxiosError(error);
throw error
};
return await onUnauthorizedRequest(error.config);

@@ -202,0 +205,0 @@ } else {