
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
web-auth-prf2
Advanced tools
A lightweight TypeScript library that implements WebAuthn with PRF (Pseudo-Random Function) for secure authentication and encryption. This package allows users to register, authenticate, and encrypt/decrypt messages using derived keys.
A lightweight TypeScript library that implements WebAuthn with PRF (Pseudo-Random Function) for secure authentication and encryption. This package allows users to register, authenticate, and encrypt/decrypt messages using derived keys.
Install the package using npm:
# npm install webauthn-prf-example
To register a new user, call the handleRegister function:
// import { handleRegister } from "webauthn-prf-example";
document.getElementById("registerBtn").addEventListener("click", async () => {
await handleRegister();
});
To authenticate an existing user, call the handleAuthenticate function:
// import { handleAuthenticate } from "webauthn-prf-example";
document
.getElementById("authenticateBtn")
.addEventListener("click", async () => {
await handleAuthenticate();
});
To save and retrieve encrypted messages, use the saveMessage and loadMessages functions:
// import { saveMessage } from "webauthn-prf-example";
document
.getElementById("saveMessageBtn")
.addEventListener("click", async () => {
await saveMessage();
});
To log out and clear stored credentials and messages, use the handleLogout function:
// import { handleLogout } from "webauthn-prf-example";
document.getElementById("logoutBtn").addEventListener("click", async () => {
await handleLogout();
});
handleRegister()Registers a new user with WebAuthn and securely stores authentication credentials.
handleAuthenticate()Authenticates a registered user using WebAuthn credentials.
saveMessage()Encrypts and saves a message using the derived encryption key.
loadMessages()Loads and decrypts saved messages.
handleLogout()Clears stored credentials and messages, effectively logging out the user.
For more details, check out the official WebAuthn documentation: MDN WebAuthn Docs.
FAQs
A lightweight TypeScript library that implements WebAuthn with PRF (Pseudo-Random Function) for secure authentication and encryption. This package allows users to register, authenticate, and encrypt/decrypt messages using derived keys.
The npm package web-auth-prf2 receives a total of 6 weekly downloads. As such, web-auth-prf2 popularity was classified as not popular.
We found that web-auth-prf2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.