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 1.1.0 to 2.0.0-beta.1

dist/react-oidc-context.cjs

47

package.json
{
"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.
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