npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yubion-dev-team/yubion-fido2-server-sdk-js

v1.0.0

Published

This project is an SDK to use YubiOn FIDO2 Server Service from Node.js.

Readme

yubion-fido2-server-sdk-js

English | Japanese

What is yubion-fido2-server-sdk-js?

yubion-fido2-server-sdk-js is an SDK library for using YubiOn FIDO2Server Service (hereinafter referred to as YubiOn FSS) from node.js. It provides APIs for easily using FIDO2 authentication (Passkey) from server applications using node.js.

How to use?

Before use, you must already be registered as a customer with YubiOn FSS and have completed RP settings. For details, please refer to the YubiOn FIDO2Server Service manual.

Install the YubiOn FSS SDK in the Node.js project you will be using.

npm install @yubion-dev-team/yubion-fido2-server-sdk-js

Prepare a server-side API for registering and authenticating FIDO2 authenticators.

const sdk = new YubiOnFssSdk({
	rpId : "test.example.com",
	apiAuthId : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	apiAuthType : "NonceSignAuth",
	secretKey : "MI...",
});

app.post("/startRegistration", async (req, res) => {
	const result = await fssSdk.startRegisterCredential({
		creationOptionsBase:{
			attestation:"direct",
			authenticatorSelection:{
				residentKey : "required",
				userVerification : "required",
			},
		},
		user : {
			userId : req.body.userId,
			userName : req.body.userName,
			displayName : req.body.displayName,
			disabled : false,
		},
		options : {
			createUserIfNotExists : true,
			updateUserIfExists : true,
			credentialAttributes : {},
		},
	});
	req.session.fssSessionData = result.session;
	res.json({
		creationOptions : result.creationOptions,
	});
});
app.post("/finishRegistration", async (req, res) => {
	const sessionData = req.session.fssSessionData;
	const verifyResult = await fssSdk.verifyRegisterCredential(req.body, sessionData);
	if(!verifyResult.credential.userPresence || !verifyResult.credential.userVerification){
		throw new Error("require up and uv.");
	}
	const finishResult = await fssSdk.finishRegisterCredential(req.body, sessionData);
	res.json({
		user : finishResult.user,
		credential : finishResult.credential,
	});
});
app.post("/startAuthentication", async (req, res) => {
	const userId = req.body.userId;
	const startResponse = await fssSdk.startAuthenticate({
		requestOptionsBase : {
			userVerification : "required",
		},
		userId,
	});
	req.session.fssSessionData = startResponse.session;
	res.json({
		requestOptions : startResponse.requestOptions,
	});
});
app.post("/finishAuthentication", async (req, res) => {
	const sessionData = req.session.fssSessionData;
	const finishResponse = await fssSdk.finishAuthenticate({
		requestResponse : req.body,
	}, sessionData);
	req.session.userId = finishResponse.user.userId;
	res.json({
		userId : finishResponse.user.userId,
	});
});

In addition to FIDO2 authentication, APIs for managing registered users and credentials are also available. For details, please refer to the API reference.

Test Case Execution

To run the test case, you must set the following environment properties:
|Environment property name |Contents | |-----|---| | FSS_TEST_ENDPOINT | API endpoints (optional) for use in testing. | | FSS_TEST_RP_ID | RPID to use for testing. The various information (users/credentials) of this RPID will be destroyed when the test case is executed, so please do not use the RPID you are using. | | FSS_TEST_NONCE_API_AUTH_ID | API authentication ID to check the behavior of Nonce authentication | | FSS_TEST_NONCE_CORRECT_API_SECRET_KEY | Correct API Secret Key to check for proper operation of Nonce authentication | | FSS_TEST_NONCE_INCORRECT_API_SECRET_KEY | Wrong API Secret Key to check for Nonce authentication failure behavior | | FSS_TEST_DATETIME_API_AUTH_ID | API authentication ID to check the operation of date and time authentication | | FSS_TEST_DATETIME_CORRECT_API_SECRET_KEY | Correct API Secret Key to check the normal operation of date and time authentication | | FSS_TEST_DATETIME_INCORRECT_API_SECRET_KEY | Incorrect API Secret Key to check for failed date and time authentication behavior | | FSS_TEST_ACCESSKEY_API_AUTH_ID | API authentication ID to check the operation of access key authentication | | FSS_TEST_ACCESSKEY_CORRECT_API_SECRET_KEY | Correct API Secret Key to check the normal operation of access key authentication | | FSS_TEST_ACCESSKEY_INCORRECT_API_SECRET_KEY | Wrong API Secret Key to check for failing access key authentication behavior | | FSS_TEST_RP_ID_FOR_LICENSE_TEST | RPID to use to verify operation in case of license abnormality. Please assign the RPID created by the free registered customer. The various information (users/credentials) of this RPID will be destroyed when the test case is executed, so please do not use the RPID you are using. | | FSS_TEST_API_AUTH_ID_FOR_LICENSE_TEST | The API authentication ID for Nonce authentication to be used to check operation when license abnormalities | | FSS_TEST_API_SECRET_KEY_FOR_LICENSE_TEST | The API secret key for Nonce authentication to be used to check operation when license abnormalities |