Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@cafegene/utils
Advanced tools
Readme
useIDC is a client side SDK that establishes commnication between Open ID Connect Identity Server. This library is designed for Web Apps and Node.js applications. useOIDC adheres to PCKE extension to OAuth which facilitates secure authorization code in public clients.
yarn add @cafegene/utils
or
npm install @cafegene/utils
// Add the following env to existing react project
// It should have a REACT_APP_ prefix
REACT_APP_LOGIN_URI = 'https://login.staging.yourcompany.com',
REACT_APP_REDIRECT_URI = 'https://yourcompany.com/sample',
REACT_APP_SCOPE = 'xyz',
REACT_APP_CLIENT_SECRET = '123xyz',
REACT_APP_CLIENT_ID = '1234',
// Top Level Component
import { useOIDC } from '@cafegene/utils';
const App: React.FC = () => {
const [user] = useOIDC()
return (
<Route to='/admin'>
{
user.isAuthenticated && </Admin>
}
</Route>
);
}
useOIDC performs authorization, authentication and request an access token for your react application.
It will first check if you have an access token. If access token does not exist then it will start the Open Id Connection flow.
Your application will be redirected to the url you provided in the REACT_APP_LOGIN_URI env. If login credentials is correct then you'll be authorize in a code will be return in the url.
To request for an access token, that code will then be taken by useOIDC and use it to authenticate you. If authenticated the Open ID Identity server will return an acceess token.
Use that access token to to request for data from the GRPC server.
FAQs
# USE OIDC
The npm package @cafegene/utils receives a total of 0 weekly downloads. As such, @cafegene/utils popularity was classified as not popular.
We found that @cafegene/utils 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.