New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nap-auth

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nap-auth

A lightweight behavioral authentication web component using neural patterns.

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

🧠 nap-auth

A lightweight behavioral authentication Web Component that uses neural interaction patterns — identify users based on how they interact, not just what they do.

📦 Installation

npm install nap-auth

🚀 Usage

1. Import the Component

import 'nap-auth';

2. Add to HTML

<nap-auth username="demo" mode="register"></nap-auth>

3. Listen for Events

document.querySelector('nap-auth').addEventListener('auth-success', e => {
  console.log('✅ Auth Success:', e.detail);
});

document.querySelector('nap-auth').addEventListener('auth-fail', e => {
  console.log('❌ Auth Fail:', e.detail);
});

document.querySelector('nap-auth').addEventListener('auth-progress', e => {
  console.log('⏳ Training Progress:', e.detail);
});

🧠 Features

  • ✔️ Built with Vanilla JS + Web Components API
  • 🖱️ Tracks user behavior (mouse speed, hesitations, interaction rhythm)
  • 🧬 Simple neural network built-in
  • 🔐 No passwords, no biometrics — just how you behave
  • 🎯 Emits standard events: auth-success, auth-fail, auth-progress

⚙️ Attributes

AttributeTypeDescription
usernamestringUnique ID for the user
modestringregister to train, login to authenticate

🧱 Project Structure

nap-auth/
├── src/
│   ├── nap-auth.js              # <nap-auth> component
│   ├── neutral-auth.js              
│   └── auth/                    # Neural engine + behavior tracking
│       ├── behavior-tracker.js
│       ├── neural-network.js
│       ├── feature-extractor.js
│       ├── authentication.js
│       └── anti-spoofing.js
├── dist/
│   └── nap-auth.mjs             # Compiled output (ES module)
├── vite.config.js               # Vite build config
├── package.json
└── README.md

📜 License

MIT © Pratik Acharya

🧪 Development

git clone https://github.com/yourusername/nap-auth
cd nap-auth
npm install
npm run build

For local preview testing:

npm run preview

📣 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you’d like to change.

web-component neural-auth passwordless behavioral-auth biometrics custom-elements

Made with ❤️ by @pratikacharya1234

Keywords

web-component

FAQs

Package last updated on 17 Apr 2025

Did you know?

Socket

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.

Install

Related posts