Skip to main content

A comprehensive authentication SDK for Python with Pydantic support. Features include user registration, login, 2FA, password management, and secure token handling.

Project description

Arvasit Authentication SDK

A comprehensive authentication SDK for Node.js and Python with TypeScript/Pydantic support.

🚀 Quick Start

Node.js

npm install @pratik_25/auth-sdk
import { AuthService, AuthServiceConfig } from '@pratik_25/auth-sdk';

const config: AuthServiceConfig = {
  url: 'https://your-auth-service.com',
  publicKey: 'your_public_key',
  secretKey: 'your_secret_key'
};

const authService = new AuthService(config);

Python

pip install arvasit-auth-sdk

📋 Available Methods

User Management

  • registerUser(data) - Register new user
  • loginUser(data) - User login
  • logoutUser(token) - User logout
  • refreshToken(token) - Refresh access token
  • verifyToken(token) - Verify token validity

Password Management

  • forgotPassword(email) - Send password reset
  • resetPassword(data) - Reset password
  • changePassword(data) - Change password
  • verifyPasswordReset(data) - Verify reset token

Two-Factor Authentication

  • enable2FA(userId) - Enable 2FA
  • disable2FA(userId) - Disable 2FA
  • verify2FA(data) - Verify 2FA code
  • generate2FABackupCodes(userId) - Generate backup codes

User Profile

  • getUserProfile(userId) - Get user profile
  • updateUserProfile(userId, data) - Update profile
  • deleteUser(userId) - Delete user account

Session Management

  • getActiveSessions(userId) - Get active sessions
  • revokeSession(sessionId) - Revoke session
  • revokeAllSessions(userId) - Revoke all sessions

Verification

  • sendEmailVerification(email) - Send email verification
  • verifyEmail(data) - Verify email
  • sendPhoneVerification(phone) - Send phone verification
  • verifyPhone(data) - Verify phone

🔧 Configuration

Both SDKs support the same configuration:

interface AuthServiceConfig {
  url: string;           // Your auth service URL
  publicKey: string;     // Public API key
  secretKey: string;    // Secret API key
}

📚 Examples

See the examples/ directory for detailed usage examples.

📄 License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arvasit_auth_sdk-0.1.5.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arvasit_auth_sdk-0.1.5-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file arvasit_auth_sdk-0.1.5.tar.gz.

File metadata

  • Download URL: arvasit_auth_sdk-0.1.5.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for arvasit_auth_sdk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a86f9dd9c51c43de81ef0c79b3fe553edf6d527cdbe40adedf379d161c2af758
MD5 41db03dc3e38bacecb17f4e6cb3a2abf
BLAKE2b-256 1e661cae15be32ffb74c546dfb336450fa6054b2e23fe0c8a1f2114b0fa4bacd

See more details on using hashes here.

File details

Details for the file arvasit_auth_sdk-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for arvasit_auth_sdk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9bfce231967bc94701fa481e01fb524b4954cbe988087696e17e378be9b6311f
MD5 6f603626fa91e6120bf2c20ab663a617
BLAKE2b-256 9e57822752aab46b0d26b31fcf5cb8a6ed43d97455a99f4186a1d5e2a8630b95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page