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.8.4 to 1.8.5

2

dist/index.d.ts
export { AuthProvider, AuthContext } from './AuthContext';
export type { TAuthConfig, IAuthProvider, IAuthContext } from './Types';
export type { TAuthConfig, IAuthProvider, IAuthContext, TRefreshTokenExpiredEvent } from './Types';
{
"name": "react-oauth2-code-pkce",
"version": "1.8.4",
"version": "1.8.5",
"description": "Provider agnostic react package for OAuth2 Authorization Code flow with PKCE",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -29,3 +29,3 @@ # react-oauth2-code-pkce · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/soofstad/react-oauth2-pkce/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/react-oauth2-code-pkce)](https://www.npmjs.com/package/react-oauth2-code-pkce) ![CI](https://github.com/soofstad/react-oauth2-pkce/actions/workflows/tests.yaml/badge.svg)

```tsx
import { AuthContext, AuthProvider, TAuthConfig } from "react-oauth2-code-pkce"
import { AuthContext, AuthProvider, TAuthConfig, TRefreshTokenExpiredEvent } from "react-oauth2-code-pkce"

@@ -38,2 +38,3 @@ const authConfig: TAuthConfig = {

scope: 'someScope openid',
onRefreshTokenExpire: (event: TRefreshTokenExpiredEvent) => window.confirm('Session expired. Refresh page to continue using the site?') && event.login(),
}

@@ -60,4 +61,2 @@

For more advanced examples, see `./examples/`.
For instance, it's recommended to add a "Session expired"-callback like so:
`onRefreshTokenExpire: (event) => window.confirm('Session expired. Refresh page to continue using the site?') && event.login(),`.

@@ -154,2 +153,4 @@ ## Install

This could also happend if some routes in your app are not wrapped by the `<AuthProvider>`.
## Develop

@@ -156,0 +157,0 @@

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