Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@fingerprintjs/fingerprintjs-pro-svelte
Advanced tools
FingerprintJS Pro Svelte is an easy-to-use Svelte library for FingerprintJS Pro that also works with svelte-kit. Example apps can be found in the examples folder. This package works with FingerprintJS Pro, it is not compatible with open-source FingerprintJS. You can learn more about the difference between FingerprintJS Pro and open-source FingerprintJS in the official documentation.
yarn add @fingerprintjs/fingerprintjs-pro-svelte
Or:
npm install @fingerprintjs/fingerprintjs-pro-svelte
In order to identify visitors, you'll need a FingerprintJS Pro account (you can sign up for free). You can learn more about API keys in the official FingerprintJS Pro documentation.
FpjsProvider
. You can specify multiple configuration options. // App.svelte
<script>
import { FpjsProvider } from '@fingerprintjs/fingerprintjs-pro-svelte'
import VisitorData from './VisitorData.svelte'
const options = {
loadOptions: {
apiKey: '<YOUR_API_KEY>'
},
};
</script>
<FpjsProvider {options}>
<VisitorData />
</FpjsProvider>
useVisitorData
function in your svelte components to perform visitor identification and get the data.// VisitorData.svelte
<script>
import { useVisitorData } from '@fingerprintjs/fingerprintjs-pro-svelte';
// Set to true fo fetch data when component is mounted
export let immediate = false;
const { getData, data, isLoading, error } = useVisitorData({ extendedResult: true }, { immediate });
$: {
if ($data) {
// Do something with visitorData here
}
}
</script>
<div>
<button id='get_data' on:click={() => getData()}> Get data</button>
{#if $isLoading}
<div id='loading'>Loading...</div>
{/if}
{#if $error}
<div id='error'>Error occurred: {$error.message}</div>
{/if}
{#if $data}
<div>
<!--visitorData is available here!-->
</div>
{/if}
</div>
See the full code in example apps located in examples folder.
When you use FingerprintJS Pro, you pay for each API call. Our best practices recommend using cache to reduce the API call rate. The Library uses the SessionStorage cache strategy by default.
:warning: WARNING If you use data from extendedResult
, please pay additional attention to caching strategy.
Some fields from the extendedResult (e.g ip
or lastSeenAt
) might change for the same visitor. If you need to get the current data, it is recommended to pass ignoreCache=true
inside getData
function.
You can find API reference here.
This library uses FingerprintJS Pro agent internally. The documentation for the FingerprintJS Pro agent is available on https://dev.fingerprint.com/docs.
FAQs
FingerprintJS Pro integration for Svelte
The npm package @fingerprintjs/fingerprintjs-pro-svelte receives a total of 398 weekly downloads. As such, @fingerprintjs/fingerprintjs-pro-svelte popularity was classified as not popular.
We found that @fingerprintjs/fingerprintjs-pro-svelte 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.