
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@passbase/verify-button
Advanced tools
To integrate the Verify Button, follow this guide and use your own API Key which you can obtain from the developer dashboard.
# NPM
npm install --save @passbase/verify-button
# Yarn
yarn add @passbase/verify-button
See Retrieve your API Keys section in Documentation.
Generate a JWT containing an end_user_id field with a unique identifier for the end user. [TO BE COMPLETED]
The package provides two ways of rendering the Verify Button: with a render function or a React component.
Import as ES Module:
import Passbase from "@passbase/verify-button";
or UMD Module:
<script defer src="https://unpkg.com/@passbase/verify-button"></script>
<script>
document.addEventListener("DOMContentLoaded", () => {
// 'Passbase' is available as a global variable
});
</script>
Invoke the button rendering function
renderButton(mountingElement, props);
Where the function's signature is:
type RenderButtonFunction = (
mountingElement: HTMLElement, // The target element that Passbase Verify Button will be rendered
props: VerificationButtonProps) // Required object, see full props list in the section below
=> void;
In order to render React component provided by the package, you must install the peer dependencies which the component is leveraging.
# NPM
npm install --save react react-dom
# Yarn
yarn add react react-dom
You can now import and render the component as follows.
import VerifyButton from "@passbase/verify-button/react";
<VerifyButton
apiKey="YOUR_API_KEY"
customerPayload="your.signed.jwt"
onStart={() => {}}
onError={(error, context) => {}}
onFinish={() => {}}
onSubmitted={() => {}}
/>;
| Name | Description | Signature | Required |
|---|---|---|---|
| apiKey | The Passbase API Key you obtained from the dashboard | string | Yes |
| customerPayload | The JWT containing the session's information | string | Yes |
| onStart | The callback triggered on verification flow start | OnStartCallback | No |
| onError | The callback triggered on verification flow error | OnErrorCallback | No |
| onFinish | The callback triggered on verification flow completion | OnFinishCallback | No |
| onSubmitted | The callback triggered on submission of the data | OnSubmittedCallback | No |
It is recommended to provide an onError callback. It will be invoked if the verification flow was cancelled by user or finished with error.
type OnErrorCallback = (error: ErrorCode, context: ErrorContext) => void;
By the error code you can detect the reason why verification flow failed:
enum ErrorCode {
UserCancelled = "CANCELLED_BY_USER",
FatalError = "FATAL_ERROR",
}
By the error context you can detect the step where the error occurred:
type ErrorContext = { step?: string };
You're likely trying to render the component server side, which is not supported yet. You should disable SSR in your rendering framework of choice (i.e. NextJS: https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr)
FAQs
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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.