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.15.2 to 1.15.3

2

dist/authentication.js

@@ -74,3 +74,3 @@ "use strict";

}
const tokenRequest = Object.assign(Object.assign({ grant_type: 'authorization_code', code: authCode, scope: config.scope, client_id: config.clientId, redirect_uri: config.redirectUri, code_verifier: codeVerifier }, config.extraTokenParameters), config.extraAuthParams);
const tokenRequest = Object.assign(Object.assign({ grant_type: 'authorization_code', code: authCode, client_id: config.clientId, redirect_uri: config.redirectUri, code_verifier: codeVerifier }, config.extraTokenParameters), config.extraAuthParams);
return postTokenRequest(config.tokenEndpoint, tokenRequest);

@@ -77,0 +77,0 @@ };

import { TTokenResponse } from './Types';
export declare const FALLBACK_EXPIRE_TIME = 600;
export declare const epochAtSecondsFromNow: (secondsFromNow: number) => number;
export declare const epochAtSecondsFromNow: (secondsFromNow: number | string) => number;
/**

@@ -5,0 +5,0 @@ * Check if the Access Token has expired.

@@ -6,3 +6,4 @@ "use strict";

// Returns epoch time (in seconds) for when the token will expire
const epochAtSecondsFromNow = (secondsFromNow) => Math.round(Date.now() / 1000 + secondsFromNow);
// 'secondsFromNow' should always be an integer, but some auth providers has decided that whole numbers should be strings...
const epochAtSecondsFromNow = (secondsFromNow) => Math.round(Date.now() / 1000 + Number(secondsFromNow));
exports.epochAtSecondsFromNow = epochAtSecondsFromNow;

@@ -20,3 +21,3 @@ /**

const refreshExpireKeys = [
'refresh_expires_in',
'refresh_expires_in', // KeyCloak
'refresh_token_expires_in', // Azure AD

@@ -23,0 +24,0 @@ ];

import { ReactNode } from 'react';
interface TTokenRqBase {
grant_type: string;
scope?: string;
client_id: string;

@@ -13,2 +12,3 @@ redirect_uri: string;

export interface TTokenRequestForRefresh extends TTokenRqBase {
scope?: string;
refresh_token: string;

@@ -15,0 +15,0 @@ }

{
"name": "react-oauth2-code-pkce",
"version": "1.15.2",
"version": "1.15.3",
"description": "Provider agnostic 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