Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
xendit-fingerprint-sdk-web
Advanced tools
Readme
Web SDK for device identification and fingerprinting with Xendit services.
Initialize the SDK with your public API key on application start up and perform a scan.
The SDK must be initialized before use.
// Initialize the SDK on every page load
XenditFingerprintSDK.init({
apiKey: 'MY_PUBLIC_API_KEY',
})
// Run a scan immediately after initialization
XenditFingerprintSDK.scan()
The session ID is retrievable from either XenditFingerprintSDK.init()
on SDK
initialization or from the XenditFingerprintSDK.getSessionID()
convenience method
any time after initialization.
Both of these functions returns a Session ID of type string
.
// On SDK init
var sessionID = XenditFingerprintSDK.init('MY_PUBLIC_API_KEY')
// After SDK init
var sessionID = XenditFingerprintSDK.getSessionID()
This Session ID can then be passed on to other Xendit APIs that support device fingerprinting. Please refer to the respective API's documentation for further info.
Supported web browsers:
In a browser:
<script src="https://cdn.jsdelivr.net/npm/xendit-fingerprint-sdk-web/dist/xendit-fingerprint-sdk-web.js">
Using NPM:
$ npm install --save xendit-fingerprint-sdk-web
Asynchronous SDK methods have been labeled async
, these return a Promise
object. Refer to the
returns section of each method for the resolved type.
init()
The SDK must be initialized before it can be used.
const sessionId = XenditFingerprintSDK.init({apiKey: publicKey});
Name | Type | Required | Description |
---|---|---|---|
initOptions | InitOptions Object | Yes | Initialization options |
Do not use your private API key!
InitOptions
Object
Name | Type | Required | Description |
---|---|---|---|
apiKey | string | Yes | A valid public API key provided by Xendit Dashboard |
Name | Type | Description |
---|---|---|
sessionId | string | Generated session ID |
async scan()
Scans the web browser and sends the device fingerprint data to Xendit.
await
the scan, let it run in the background. This avoids blocking
any foreground application code execution.XenditFingerprintSDK.scan()
// Or
XenditFingerprintSDK.scan(customerEventName, customerEventID)
Name | Type | Required | Description |
---|---|---|---|
customerEventName | string | No | Optional event name to associate with this scan. Recommended to use snake case formatting. e.g. 'some_event_name' |
customerEventID | string | No | Optional identifier associated with the event. e.g. user account ID |
getSessionID()
Convenience method to retrieve Session ID after SDK initialization.
const sessionId = XenditFingerprintSDK.getSessionID();
Name | Type | Description |
---|---|---|
sessionID | string | Generated session ID |
setEnabled()
Enables or disables the SDK.
// Disables the SDK
XenditFingerprintSDK.setEnabled(false);
// Re-enables the SDK
XenditFingerprintSDK.setEnabled(true);
Name | Type | Required | Description |
---|---|---|---|
enable | boolean | Yes | true enables the SDK.false disables the SDK. |
FAQs
Web SDK for Xendit's device fingerprinting.
The npm package xendit-fingerprint-sdk-web receives a total of 0 weekly downloads. As such, xendit-fingerprint-sdk-web popularity was classified as not popular.
We found that xendit-fingerprint-sdk-web demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.