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
from auth_sdk import AuthService, AuthServiceConfig

config = AuthServiceConfig(
    url="https://your-auth-service.com",
    public_key="your_public_key",
    secret_key="your_secret_key"
)

auth_service = AuthService(config)

📋 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.4.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.4-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: arvasit_auth_sdk-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 053898b9d6e515d633cf39e72135e555b434c904336797b3a38703b69cd35a0f
MD5 23cb3599463c325b05a3262d84b107c3
BLAKE2b-256 5e2d4fe6a4d345ace543ba80e9249411e86a2cd090898c77e15f39dc2f247297

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for arvasit_auth_sdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a382e7656dd94314ef56a907cbe433e5908a96b4afae64ce9a92d364ac7e85f9
MD5 1f5e8258b7d191041a005ab5b9e30c06
BLAKE2b-256 bf6be948f6b1f2a064d447582b1e5284879019cd7fad95ece52f797707424d7d

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