react-oidc-context
Advanced tools
Comparing version 1.1.0 to 2.0.0-beta.1
{ | ||
"name": "react-oidc-context", | ||
"version": "1.1.0", | ||
"version": "2.0.0-beta.1", | ||
"description": "OpenID Connect & OAuth2 authentication using react context api as state management", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com:pamapa/react-oidc-context.git" | ||
"url": "git+https://github.com:authts/react-oidc-context.git" | ||
}, | ||
"homepage": "https://github.com/pamapa/react-oidc-context#readme", | ||
"homepage": "https://github.com/authts/react-oidc-context#readme", | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"module": "dist/react-oidc-context.esm.js", | ||
"typings": "dist/index.d.ts", | ||
"main": "dist/react-oidc-context.cjs", | ||
"module": "dist/react-oidc-context.mjs", | ||
"types": "dist/react-oidc-context.d.ts", | ||
"files": [ | ||
@@ -27,15 +27,15 @@ "dist" | ||
"scripts": { | ||
"start": "tsdx watch", | ||
"build": "tsdx build", | ||
"test": "tsdx test", | ||
"lint": "eslint ./src/**/*.ts" | ||
"build": "node scripts/build.js && npm run build-types", | ||
"build-types": "tsc --emitDeclarationOnly && api-extractor run", | ||
"prepack": "npm run build", | ||
"test": "tsc -p test/tsconfig.json && jest", | ||
"lint": "eslint --cache .", | ||
"prepare": "husky install" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=16", | ||
"oidc-client": "^1.11.5" | ||
"react": ">=16.8.0", | ||
"oidc-client-ts": "^2.0.0-beta.3" | ||
}, | ||
"dependencies": { | ||
"oidc-client": "^1.11.5" | ||
}, | ||
"devDependencies": { | ||
"@microsoft/api-extractor": "^7.18.10", | ||
"@testing-library/jest-dom": "^5.5.0", | ||
@@ -48,8 +48,11 @@ "@testing-library/react": "^12.0.0", | ||
"@typescript-eslint/parser": "^4.29.0", | ||
"esbuild": "^0.13.2", | ||
"eslint": "^7.32.0", | ||
"eslint-plugin-testing-library": "^4.10.1", | ||
"eslint-plugin-testing-library": "^5.0.0", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react-test-renderer": "^17.0.2", | ||
"@weiran.zsd/tsdx": "^0.16.2", | ||
"husky": "^7.0.2", | ||
"jest": "^27.2.0", | ||
"lint-staged": "^11.1.2", | ||
"tslib": "^2.2.0", | ||
@@ -59,10 +62,8 @@ "ts-jest": "^27.0.5", | ||
}, | ||
"jest": { | ||
"clearMocks": true, | ||
"testURL": "https://www.example.com/", | ||
"testEnvironment": "jsdom" | ||
"engines": { | ||
"node": ">=12.13.0" | ||
}, | ||
"engines": { | ||
"node": ">=10" | ||
"lint-staged": { | ||
"*.{js,jsx,ts,tsx}": "eslint --cache --fix" | ||
} | ||
} |
# react-oidc-context | ||
[![Stable Release](https://img.shields.io/npm/v/react-oidc-context.svg)](https://npm.im/react-oidc-context) | ||
![Pipeline](https://github.com/pamapa/oidc-client-react/workflows/Release/badge.svg) | ||
![Pipeline](https://github.com/authts/react-oidc-context/workflows/Release/badge.svg) | ||
Lightweight auth library using the [oidc-client](https://github.com/IdentityModel/oidc-client-js) library for React single page applications (SPA). | ||
Lightweight auth library using the [oidc-client-ts](https://github.com/authts/oidc-client-ts) library for React single page applications (SPA). | ||
Support for [hooks](https://reactjs.org/docs/hooks-intro.html) and [higher-order components (HOC)](https://reactjs.org/docs/higher-order-components.html). | ||
@@ -21,6 +21,6 @@ | ||
## Documentation | ||
This library implements an auth context provider by making use of the `oidc-client` library. Its configuration is | ||
This library implements an auth context provider by making use of the `oidc-client-ts` library. Its configuration is | ||
tight coupled to that library. | ||
- [oidc-client](https://github.com/IdentityModel/oidc-client-js/wiki) | ||
- [oidc-client-ts](https://github.com/authts/oidc-client-ts) | ||
@@ -174,3 +174,3 @@ The User and UserManager is hold in this context, which is accessible from the React application. Additionally it intercepts | ||
// src/slice.js | ||
import { User } from "oidc-client" | ||
import { User } from "oidc-client-ts" | ||
@@ -207,6 +207,6 @@ function getUser() { | ||
## Influences | ||
This library is inspired by [oidc-react](https://github.com/bjerkio/oidc-react), which lacks error handling and [auth0-react](https://github.com/auth0/auth0-react), which is focued on auth0. | ||
This library is inspired by [oidc-react](https://github.com/bjerkio/oidc-react), which lacks error handling and [auth0-react](https://github.com/auth0/auth0-react), which is focused on auth0. | ||
## License | ||
This project is licensed under the MIT license. See the [LICENSE](https://github.com/pamapa/oidc-client-react/blob/main/LICENSE) file for more info. | ||
This project is licensed under the MIT license. See the [LICENSE](https://github.com/authts/oidc-client-react/blob/main/LICENSE) file for more info. |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
2
0
1
26857
20
7
539
+ Addedjwt-decode@3.1.2(transitive)
+ Addedoidc-client-ts@2.4.0(transitive)
- Removedoidc-client@^1.11.5
- Removedacorn@7.4.1(transitive)
- Removedbase64-js@1.5.1(transitive)
- Removedcore-js@3.37.1(transitive)
- Removedoidc-client@1.11.5(transitive)
- Removedrandombytes@2.1.0(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedserialize-javascript@4.0.0(transitive)