
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@tryfinch/react-connect
Advanced tools
The SDK for Finch's authorization flow, Finch Connect
Available on npm at @tryfinch/react-connect
:
npm install @tryfinch/connect
Available via CDN:
<script src="https://prod-cdn.tryfinch.com/latest/connect.js"></script>
import React, { useState } from 'react';
import { useFinchConnect } from '@tryfinch/react-connect';
const App = () => {
const [code, setCode] = useState(null);
// Define callbacks
/**
* @param {string} code - The authorization code to exchange for an access token
* @param {string?} state - The state value that was provided when launching Connect
*/
const onSuccess = ({ code, state }) => setCode(code);
/**
* @param {string} errorMessage - The error message
* @param {'validation_error' | 'employer_error'} errorType - The type of error
* - 'validation_error': Finch Connect failed to open due to validation error
* - 'employer_connection_error': The errors employers see within the Finch Connect flow
*/
const onError = ({ errorMessage, errorType }) =>
console.error(errorMessage, errorType);
const onClose = () => console.log('User exited Finch Connect');
// Initialize the FinchConnect hook
const { open } = useFinchConnect({
onSuccess,
onError,
onClose,
});
// Generate a session ID using the /connect/sessions endpoint on the Finch API
// See the docs here https://developer.tryfinch.com/api-reference/connect/new-session#create-a-new-connect-session
const sessionId = '';
return (
<div>
<header>
<p>Code: {code}</p>
<button type="button" onClick={() => open({ sessionId })}>
Open Finch Connect
</button>
</header>
</div>
);
};
<html>
<head>
<script src="https://prod-cdn.tryfinch.com/latest/connect.js"></script>
</head>
<body>
<button id="connect-button">Open Finch Connect</button>
<script>
// Define callbacks
/**
* @param {string} code - The authorization code to exchange for an access token
* @param {string?} state - The state value that was provided when launching Connect
*/
const onSuccess = ({ code, state }) => {
// Exchange code for access token via your server
};
/**
* @param {string} errorMessage - The error message
* @param {'validation_error' | 'employer_error'} errorType - The type of error
* - 'validation_error': Finch Connect failed to open due to validation error
* - 'employer_connection_error': The errors employers see within the Finch Connect flow
*/
const onError = ({ errorMessage }) => {
console.error(errorMessage);
};
const onClose = () => {
console.log('Connect closed');
};
const connect = FinchConnect.initialize({
onSuccess,
onError,
onClose,
});
// Generate a session ID using the /connect/sessions endpoint on the Finch API
// See the docs here https://developer.tryfinch.com/api-reference/connect/new-session#create-a-new-connect-session
const sessionId = '';
const button = document.getElementById('connect-button');
button.addEventListener('click', () => {
connect.open({ sessionId });
});
</script>
</body>
</html>
FAQs
The SDK for Finch's authorization flow, Finch Connect
The npm package @tryfinch/react-connect receives a total of 10,080 weekly downloads. As such, @tryfinch/react-connect popularity was classified as popular.
We found that @tryfinch/react-connect demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.