
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
react-oauth2-pkce
Advanced tools
Authenticate against generic OAuth2 using PKCE
npm install --save react-oauth2-pkce
import React from 'react'
import { AuthProvider, AuthService } from 'react-oauth2-pkce'
import { Routes } from './Routes';
const authService = new AuthService({
clientId: process.env.REACT_APP_CLIENT_ID || 'CHANGEME',
location: window.location,
provider: process.env.REACT_APP_PROVIDER || 'https://sandbox.auth.ap-southeast-2.amazoncognito.com/oauth2',
redirectUri: process.env.REACT_APP_REDIRECT_URI || window.location.origin,
scopes: ['openid', 'profile']
});
const App = () => {
return (
<AuthProvider authService={authService} >
<Routes />
</AuthProvider>
)
}
export default App
After https://github.com/gardner/react-oauth2-pkce/pull/16 it is possible to pass in just provider
or authorizeEndpoint
, tokenEndpoint
and logoutEndpoint
. These two parameters were added to maintain backwards compatibility while enabling callers to customize the endpoint.
You can end user session when calling logout(true)
. A custom endpoint can configured by passing logoutEndpoint
as props. The user will be redirected to the redirectUri
.
MIT © Gardner Bickford
FAQs
Authenticate against generic OAuth2 using PKCE
The npm package react-oauth2-pkce receives a total of 403 weekly downloads. As such, react-oauth2-pkce popularity was classified as not popular.
We found that react-oauth2-pkce demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.