
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@slashid/react
Advanced tools
Check out our developer docs for guides and API documentation. You can also check out the demo on CodeSandbox:
Your organization needs to sign up with /id
to get access to the core SDK and an organization ID.
Your environment should have the following dependencies installed:
node.js
=> v16+
react
=> v16+
@slashid/slashid
=> v1.8+
After obtaining your organization ID, log in to npm
and install the package:
npm install @slashid/react
Primary way of communicating with the /id
APIs is by using the provided useSlashID
hook. In order to do so, your app needs to be wrapped in the SlashIDProvider
. This provider requires you to pass in the organization ID you received from /id
as the value of the oid
prop.
import { SlashIDProvider } from "@slashid/react";
import React from "react";
import ReactDOM from "react-dom/client";
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode>
<SlashIDProvider oid="ORGANIZATION_ID">
<App />
</SlashIDProvider>
</React.StrictMode>
);
function App() {
const { user, logIn } = useSlashID();
return (
<>
<button
onClick={() =>
logIn({
handle: {
type: "email_address",
value: "example@email.com",
},
factor: { method: "email_link" },
})
}
>
Log in
</button>
<div>
<code>{user}</code>
</div>
</>
);
}
Once the logIn
function resolves, your component will render again with the newly logged-in user
object.
FAQs
React SDK for the /id platform
The npm package @slashid/react receives a total of 2,694 weekly downloads. As such, @slashid/react popularity was classified as popular.
We found that @slashid/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.