
Research
PyPI Package Impersonates SymPy to Deliver Cryptomining Malware
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.
@authsignal/react
Advanced tools
đźš§ Work in progress: Not intended for production use. đźš§
Add @authsignal/react to your package.json dependencies.
npm install @authsignal/react
yarn add @authsignal/react
Add the Authsignal component to your app. Generally, this should be placed at the root of your app.
import { Authsignal } from '@authsignal/react';
function App() {
return (
<div>
<Checkout />
<Authsignal tenantId="YOUR_TENANT_ID" baseUrl="YOUR_BASE_URL" />
</div>
);
}
Import the useAuthsignal hook in your component.
Then pass the challengeOptions returned from your server to the startChallenge function.
import { useAuthsignal } from '@authsignal/react';
export function Checkout() {
const { startChallenge } = useAuthsignal();
const handlePayment = async () => {
const response = await fetch('/api/payment', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
});
const data = await response.json();
if (data.challengeOptions) {
startChallenge({
...challengeOptions,
onChallengeSuccess: ({ token }) => {
// Challenge was successful
},
onCancel: () => {
// User cancelled the challenge
},
onTokenExpired: () => {
// Token expired
},
});
}
};
return (
<div>
<button type="button" onClick={handlePayment}>Pay</button>
</div>
);
}
Alternatively, you can use the startChallengeAsync function to work with promises.
import { useAuthsignal } from '@authsignal/react';
export function Checkout() {
const { startChallengeAsync } = useAuthsignal();
const handlePayment = async () => {
setIsLoading(true);
const response = await fetch('/api/payment', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
});
const data = await response.json();
if (data.challengeOptions) {
try {
const { token } = await startChallengeAsync({
...challengeOptions,
});
// Challenge was successful
} catch (e) {
if (e instanceof ChallengeError) {
console.error(e);
if (e.code === "USER_CANCELLED") {
// User cancelled the challenge
} else if (e.code === "TOKEN_EXPIRED") {
// Token expired
}
}
}
}
setIsLoading(false);
};
return (
<div>
<button type="button" onClick={handlePayment}>Pay</button>
</div>
);
}
FAQs
React components for [Authsignal](https://authsignal.com).
The npm package @authsignal/react receives a total of 38 weekly downloads. As such, @authsignal/react popularity was classified as not popular.
We found that @authsignal/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.