@adyen/bpscaweb

中文文档
0.1.5发布于 2024/11/27MITTypeScriptES Module近 30 天下载 7052

Balance Platform SCA Web library

原始使用文档
文档目录6 节
  1. Installation
  2. Configuration
  3. Options
  4. Check availability
  5. Register device
  6. Authenticate device

Balance Platform SCA Web

This library offers an easy way to perform operations with Strong Customer Authorization. This library is based on WebAuthn to guarantee the security of the operations.

Installation

You can use this library direclty on your browser or you can add as a dependency on your JS project.

With npm do

npm install @adyen/bpscaweb

With browsers do

<script type="module" src="bpscaweb.es.js"></script>
<script type="module">
  import ScaWebauthn from '/js/bpscaweb.es.js';
  ...
</script>

In your TS project do

import ScaWebauthn from '@adyen/bpscaweb';

Configuration

Once you have installed the component, you can configure it when you create a new handler.

const handler = ScaWebauthn.create(options);

Options

These are the options you can pass to the component

OptionRequiredTypeDescription
relyingPartyNameYesstringA string representing the name of the relying party. This is the name the user will be presented with when creating or validating a WebAuthn operation.

Example: Create a handler

const scaWebauthn = ScaWebauthn.create({
  relyingPartyName: 'adyen_bpsca',
});

Check availability

Check if SCA is available on the device.

const sdkOutput = await scaWebauthn.checkAvailability();

Register device

Exchange the sdkInput return by the backend in the initiate register call

const sdkOutput = await scaWebauthn.register(sdkInput); // the new output that will be shared with the server to complete the registration

Authenticate device

Exchange the sdkInput return by the backend in the first call

const sdkOutput = await scaWebauthn.authenticate(sdkInput); // the new output that will be shared with the server to authenticate the call

版本与发布记录

@adyen/bpscaweb 共发布 5 个版本,首次发布于 2023/11/14;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.1.5latest2024/11/271.9 年前
0.1.22024/06/052 年前
0.1.12024/04/252 年前
0.1.02024/04/122 年前
0.0.22023/11/142 年前

关于 @adyen/bpscaweb 的常见问题

@adyen/bpscaweb 是什么?

Balance Platform SCA Web library

如何安装 @adyen/bpscaweb?

在项目目录运行 npm install @adyen/bpscaweb,或使用 pnpm add / yarn add / bun add。

@adyen/bpscaweb 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@adyen/bpscaweb 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@adyen/bpscaweb 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@adyen/bpscaweb 可以商用吗?

@adyen/bpscaweb 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@adyen/bpscaweb 的下载量有多少?

根据 npm 官方下载统计,@adyen/bpscaweb 在 2026/10/05 – 2026/11/03 这 30 天内被下载 7,052 次,日均约 235 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@adyen/bpscaweb 还在维护吗?

最新版本 0.1.5 发布于 2024/11/27(1.9 年前);至今共发布 5 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/11/14。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。