@dax-crafta/auth 2.0.3 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,6 +4,7 @@ A powerful, flexible, and secure authentication system for Node.js applications.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@dax-crafta/auth.svg)](https://www.npmjs.com/package/@dax-crafta/auth)
6
6
  [![License](https://img.shields.io/npm/l/@dax-crafta/auth.svg)](https://github.com/daxp472/crafta/blob/main/LICENSE)
7
+ [![Downloads](https://img.shields.io/npm/dm/@dax-crafta/auth.svg)](https://www.npmjs.com/package/@dax-crafta/auth)
7
8
 
8
9
  ## Features
9
10
 
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@dax-crafta/auth",
3
- "version": "2.0.3",
3
+ "version": "2.1.1",
4
4
  "description": "A powerful, flexible, and secure authentication plugin for the Crafta framework. Supports JWT, social login, 2FA, RBAC, audit logging, and enterprise-grade security features.",
5
5
  "main": "src/index.js",
6
+ "types": "src/index.d.ts",
6
7
  "private": false,
7
8
  "dependencies": {
8
9
  "bcryptjs": "^2.4.3",
package/src/index.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ export function register(email: string, password: string): Promise<any>;
2
+ export function login(email: string, password: string): Promise<any>;
3
+ export function verifyToken(token: string): boolean;
4
+
5
+ export interface User {
6
+ email: string;
7
+ password?: string;
8
+ role?: string;
9
+ }
10
+
11
+ export function getUser(id: string): Promise<User>;
12
+ export function logout(): Promise<void>;