Huge News!Announcing our $40M Series B led by Abstract Ventures.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.8.0 to 1.8.1

15

dist/AuthContext.js

@@ -87,6 +87,6 @@ "use strict";

setRefreshToken(response.refresh_token);
setTokenExpire((0, timeUtils_1.epochAtSecondsFromNow)(response.expires_in || FALLBACK_EXPIRE_TIME));
setTokenExpire((0, timeUtils_1.epochAtSecondsFromNow)(response.expires_in ?? FALLBACK_EXPIRE_TIME));
// If there is no refresh_token_expire, use access_token_expire + 10min.
// If no access_token_expire, assume double the fallback expire time
let refreshTokenExpire = response.refresh_token_expires_in || 2 * FALLBACK_EXPIRE_TIME;
let refreshTokenExpire = response.refresh_token_expires_in ?? 2 * FALLBACK_EXPIRE_TIME;
if (!response.refresh_token_expires_in && response.expires_in) {

@@ -112,6 +112,9 @@ refreshTokenExpire = response.expires_in + FALLBACK_EXPIRE_TIME;

.catch((error) => {
setError(error);
if ((0, authentication_1.errorMessageForExpiredRefreshToken)(error)) {
logOut();
(0, authentication_1.redirectToLogin)(config);
console.error(error);
setError(error.message);
if (initial)
login(); // If the attempt to get a new token failed during page load, do a full login.
if ((0, authentication_1.errorMessageForExpiredRefreshToken)(error.message)) {
if (onRefreshTokenExpire)
onRefreshTokenExpire({ login });
}

@@ -118,0 +121,0 @@ });

2

package.json
{
"name": "react-oauth2-code-pkce",
"version": "1.8.0",
"version": "1.8.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