Socket
Socket
Sign inDemoInstall

react-oidc-context

Package Overview
Dependencies
6
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.0 to 2.2.1

34

dist/esm/react-oidc-context.js

@@ -166,8 +166,9 @@ // src/AuthContext.ts

void (async () => {
let user = null;
try {
if (hasAuthParams() && !skipSigninCallback) {
const user2 = await userManager.signinCallback();
onSigninCallback && onSigninCallback(user2);
user = await userManager.signinCallback();
onSigninCallback && onSigninCallback(user);
}
const user = await userManager.getUser();
user = !user ? await userManager.getUser() : user;
dispatch({ type: "INITIALISED", user });

@@ -212,11 +213,15 @@ } catch (error) {

);
return /* @__PURE__ */ React2.createElement(AuthContext.Provider, {
value: {
...state,
...userManagerContext,
removeUser,
signoutRedirect,
signoutPopup
}
}, children);
return /* @__PURE__ */ React2.createElement(
AuthContext.Provider,
{
value: {
...state,
...userManagerContext,
removeUser,
signoutRedirect,
signoutPopup
}
},
children
);
};

@@ -240,6 +245,3 @@

const auth = useAuth();
return /* @__PURE__ */ React4.createElement(Component, {
...props,
...auth
});
return /* @__PURE__ */ React4.createElement(Component, { ...props, auth });
};

@@ -246,0 +248,0 @@ C.displayName = displayName;

@@ -176,4 +176,4 @@ import type { QuerySessionStatusArgs } from 'oidc-client-ts';

*/
export declare function withAuth<P extends AuthContextProps>(Component: React_2.ComponentType<P>): React_2.ComponentType<Omit<P, keyof AuthContextProps>>;
export declare function withAuth<P>(Component: React_2.ComponentType<P>): React_2.ComponentType<Omit<P, keyof AuthContextProps>>;
export { }

@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.

"packageName": "@microsoft/api-extractor",
"packageVersion": "7.28.0"
"packageVersion": "7.33.8"
}
]
}

@@ -21,2 +21,6 @@ "use strict";

var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,

@@ -196,8 +200,9 @@ mod

void (async () => {
let user = null;
try {
if (hasAuthParams() && !skipSigninCallback) {
const user2 = await userManager.signinCallback();
onSigninCallback && onSigninCallback(user2);
user = await userManager.signinCallback();
onSigninCallback && onSigninCallback(user);
}
const user = await userManager.getUser();
user = !user ? await userManager.getUser() : user;
dispatch({ type: "INITIALISED", user });

@@ -242,11 +247,15 @@ } catch (error) {

);
return /* @__PURE__ */ import_react2.default.createElement(AuthContext.Provider, {
value: {
...state,
...userManagerContext,
removeUser,
signoutRedirect,
signoutPopup
}
}, children);
return /* @__PURE__ */ import_react2.default.createElement(
AuthContext.Provider,
{
value: {
...state,
...userManagerContext,
removeUser,
signoutRedirect,
signoutPopup
}
},
children
);
};

@@ -270,6 +279,3 @@

const auth = useAuth();
return /* @__PURE__ */ import_react4.default.createElement(Component, {
...props,
...auth
});
return /* @__PURE__ */ import_react4.default.createElement(Component, { ...props, auth });
};

@@ -276,0 +282,0 @@ C.displayName = displayName;

{
"name": "react-oidc-context",
"version": "2.2.0",
"version": "2.2.1",
"description": "OpenID Connect & OAuth2 authentication using react context api as state management",

@@ -15,2 +15,3 @@ "repository": {

".": {
"types": "./dist/types/react-oidc-context.d.ts",
"import": "./dist/esm/react-oidc-context.js",

@@ -48,4 +49,4 @@ "require": "./dist/umd/react-oidc-context.js"

"@microsoft/api-extractor": "^7.18.10",
"@testing-library/jest-dom": "^5.5.0",
"@testing-library/react": "^13.1.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@types/react": "^18.0.6",

@@ -56,8 +57,9 @@ "@types/react-dom": "^18.0.2",

"@typescript-eslint/parser": "^5.7.0",
"esbuild": "^0.15.6",
"esbuild": "^0.17.2",
"eslint": "^8.4.1",
"eslint-plugin-testing-library": "^5.0.0",
"husky": "^8.0.1",
"jest": "^27.2.0",
"jest-mock": "^29.0.1",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"jest-mock": "^29.3.1",
"lint-staged": "^13.0.0",

@@ -67,3 +69,3 @@ "react": "^18.0.0",

"react-test-renderer": "^18.0.0",
"ts-jest": "^27.0.5",
"ts-jest": "^29.0.3",
"tslib": "^2.2.0",

@@ -70,0 +72,0 @@ "typescript": "^4.2.4",

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc