Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oidc-jwt-client

Package Overview
Dependencies
Maintainers
4
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oidc-jwt-client - npm Package Compare versions

Comparing version 4.0.18-develop.4 to 4.0.18-develop.5

12

dist/cjs/OidcJwtProvider.js

@@ -6,2 +6,4 @@ 'use strict';

var zustand = require('zustand');
var constants = require('./constants.js');
var storage = require('./storage.js');
var store = require('./store.js');

@@ -58,2 +60,12 @@ require('./utils/errors.js');

var store$1 = React.useRef(store.createOidcJwtClientStore(client, removeTokenFromUrlFunction)).current;
React.useEffect(function () {
var initialState = {
userInfo: storage.Storage.get(constants.USER_INFO_TOKEN_STORAGE_KEY),
csrfToken: storage.Storage.get(constants.CSRF_TOKEN_STORAGE_KEY),
isLoggedIn: !!storage.Storage.get(constants.LOGGED_IN_TOKEN_STORAGE_KEY),
isInitialized: !client,
didRetryLogin: storage.Storage.get(constants.RETRY_LOGIN_STORAGE_KEY) === 1,
};
store$1.setState({ authState: initialState });
}, [client, store$1]);
return (React__default.default.createElement(OidcJwtContext.Provider, { value: store$1 },

@@ -60,0 +72,0 @@ React__default.default.createElement(OidcJwtInitializer, tslib_es6.__assign({}, props), children)));

10

dist/cjs/store.js
'use strict';
var zustand = require('zustand');
var constants = require('./constants.js');
var storage = require('./storage.js');
var AuthService = require('./utils/AuthService.js');

@@ -11,7 +9,7 @@

var initialState = {
userInfo: storage.Storage.get(constants.USER_INFO_TOKEN_STORAGE_KEY),
csrfToken: storage.Storage.get(constants.CSRF_TOKEN_STORAGE_KEY),
isLoggedIn: !!storage.Storage.get(constants.LOGGED_IN_TOKEN_STORAGE_KEY),
userInfo: undefined,
csrfToken: null,
isLoggedIn: false,
isInitialized: !client,
didRetryLogin: storage.Storage.get(constants.RETRY_LOGIN_STORAGE_KEY) === 1,
didRetryLogin: false,
};

@@ -18,0 +16,0 @@ var service = client

14

dist/esm/OidcJwtProvider.js
import { __assign } from './node_modules/tslib/tslib.es6.js';
import React, { createContext, useContext, useRef, useState, useEffect } from 'react';
import React, { createContext, useContext, useRef, useEffect, useState } from 'react';
import { useStore } from 'zustand';
import { USER_INFO_TOKEN_STORAGE_KEY, CSRF_TOKEN_STORAGE_KEY, LOGGED_IN_TOKEN_STORAGE_KEY, RETRY_LOGIN_STORAGE_KEY } from './constants.js';
import { Storage } from './storage.js';
import { createOidcJwtClientStore } from './store.js';

@@ -51,2 +53,12 @@ import './utils/errors.js';

var store = useRef(createOidcJwtClientStore(client, removeTokenFromUrlFunction)).current;
useEffect(function () {
var initialState = {
userInfo: Storage.get(USER_INFO_TOKEN_STORAGE_KEY),
csrfToken: Storage.get(CSRF_TOKEN_STORAGE_KEY),
isLoggedIn: !!Storage.get(LOGGED_IN_TOKEN_STORAGE_KEY),
isInitialized: !client,
didRetryLogin: Storage.get(RETRY_LOGIN_STORAGE_KEY) === 1,
};
store.setState({ authState: initialState });
}, [client, store]);
return (React.createElement(OidcJwtContext.Provider, { value: store },

@@ -53,0 +65,0 @@ React.createElement(OidcJwtInitializer, __assign({}, props), children)));

import { create } from 'zustand';
import { USER_INFO_TOKEN_STORAGE_KEY, CSRF_TOKEN_STORAGE_KEY, LOGGED_IN_TOKEN_STORAGE_KEY, RETRY_LOGIN_STORAGE_KEY } from './constants.js';
import { Storage } from './storage.js';
import { AuthService } from './utils/AuthService.js';

@@ -9,7 +7,7 @@

var initialState = {
userInfo: Storage.get(USER_INFO_TOKEN_STORAGE_KEY),
csrfToken: Storage.get(CSRF_TOKEN_STORAGE_KEY),
isLoggedIn: !!Storage.get(LOGGED_IN_TOKEN_STORAGE_KEY),
userInfo: undefined,
csrfToken: null,
isLoggedIn: false,
isInitialized: !client,
didRetryLogin: Storage.get(RETRY_LOGIN_STORAGE_KEY) === 1,
didRetryLogin: false,
};

@@ -16,0 +14,0 @@ var service = client

{
"name": "oidc-jwt-client",
"version": "4.0.18-develop.4",
"version": "4.0.18-develop.5",
"description": "Fetch JWTs for API access from oidc-jwt-provider",

@@ -5,0 +5,0 @@ "sideEffects": false,

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

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