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

react-oauth2-code-pkce

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-oauth2-code-pkce - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

6

dist/AuthContext.js

@@ -49,3 +49,7 @@ "use strict";

console.log(error);
setError(error.message);
setError(error);
if (authentication_1.errorMessageForExpiredRefreshToken(error)) {
logOut();
authentication_1.login(authConfig);
}
});

@@ -52,0 +56,0 @@ }

import { TAuthConfig, TTokenData } from "./Types";
export declare const EXPIRED_REFRESH_TOKEN_ERROR_CODES: string[];
export declare function login(authConfig: TAuthConfig): Promise<void>;

@@ -17,1 +18,2 @@ export declare const fetchTokens: (authConfig: TAuthConfig) => Promise<any>;

export declare const tokenExpired: (token: string) => Boolean;
export declare const errorMessageForExpiredRefreshToken: (errorMessage: string) => boolean;

@@ -41,2 +41,4 @@ "use strict";

var codeVerifierStorageKey = "PKCE_code_verifier";
// [ AzureAD,]
exports.EXPIRED_REFRESH_TOKEN_ERROR_CODES = ["AADSTS700084"];
function login(authConfig) {

@@ -147,1 +149,10 @@ return __awaiter(this, void 0, void 0, function () {

};
exports.errorMessageForExpiredRefreshToken = function (errorMessage) {
var expired = false;
exports.EXPIRED_REFRESH_TOKEN_ERROR_CODES.forEach(function (errorCode) {
if (errorMessage.includes(errorCode)) {
expired = true;
}
});
return expired;
};

2

package.json
{
"name": "react-oauth2-code-pkce",
"version": "1.2.0",
"version": "1.2.1",
"description": "Plug-and-play react package for OAuth2 Authorization Code flow with PKCE",

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

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