Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
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 445 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.