New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jfront/oauth-context

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jfront/oauth-context - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

CHANGELOG.md

18

dist/cjs/OAuthContextProvider.js

@@ -10,8 +10,4 @@ "use strict";

var _axios = _interopRequireDefault(require("axios"));
var _OAuthContext = require("./OAuthContext");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }

@@ -147,13 +143,5 @@

(0, _react.useEffect)(function () {
if (configureAxios && accessToken) {
var currentAxios = axiosInstance ? axiosInstance : _axios["default"];
currentAxios.interceptors.request.use(function (config) {
if (expiresIn && Date.now() < expiresIn) {
authorize();
}
config.headers["Authorization"] = "Bearer " + accessToken;
return config;
});
currentAxios.interceptors.response.use(function (response) {
if (configureAxios && axiosInstance && accessToken) {
axiosInstance.defaults.headers.Authorization = "Bearer " + accessToken;
axiosInstance.interceptors.response.use(function (response) {
if (401 === (response == null ? void 0 : response.status)) {

@@ -160,0 +148,0 @@ authorize();

import React, { useReducer, useEffect } from "react";
import { OAuthReducer, OAuth, authorizationRequest, authorizationRequestFailure, tokenRequest, tokenRequestSuccess, tokenRequestFailure, authorizationRequestSuccess } from "@jfront/oauth-core";
import axios from "axios";
import { OAuthContext } from "./OAuthContext";

@@ -131,13 +130,5 @@

useEffect(() => {
if (configureAxios && accessToken) {
var currentAxios = axiosInstance ? axiosInstance : axios;
currentAxios.interceptors.request.use(config => {
if (expiresIn && Date.now() < expiresIn) {
authorize();
}
config.headers["Authorization"] = "Bearer " + accessToken;
return config;
});
currentAxios.interceptors.response.use(response => {
if (configureAxios && axiosInstance && accessToken) {
axiosInstance.defaults.headers.Authorization = "Bearer " + accessToken;
axiosInstance.interceptors.response.use(response => {
if (401 === (response == null ? void 0 : response.status)) {

@@ -144,0 +135,0 @@ authorize();

export * from "./OAuthContext";
export * from "./OAuthContextProvider";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ module.exports = {

{
"name": "@jfront/oauth-context",
"version": "0.1.0",
"version": "0.1.1",
"license": "Apache-2.0",

@@ -11,3 +11,3 @@ "repository": "https://github.com/Jepria/jfront-oauth",

"dependencies": {
"@jfront/oauth-core": "0.1.0"
"@jfront/oauth-core": "^0.1.0"
},

@@ -41,3 +41,3 @@ "devDependencies": {

},
"gitHead": "7e0a0f24c5476638fded2449df4312b23558380f"
"gitHead": "9a0e01d051b18b15ce2734103c0860de5c4cf065"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc