Evrmore blockchain-based authentication for web applications
Project description
Evrmore Accounts
Overview
Evrmore Accounts is a Python package that provides wallet-based authentication using Evrmore blockchain. It builds on the Evrmore Authentication library to provide a complete account management system for web applications.
Features
- 🔑 Wallet-based authentication - Users sign challenges with their Evrmore wallet
- 🔒 JWT token management - Secure session handling with JSON Web Tokens
- 📁 SQLite backend - Simple, file-based database for session and challenge storage
- 👤 Automatic user management - Users are created on first authentication
- 🌐 Complete API server - Ready-to-use API server for authentication endpoints
- 🖥️ Demo web interface - Example application showing the complete authentication flow
- 📱 JavaScript client library - Easy integration with web applications
Installation
pip3 install evrmore-accounts
Quick Start
Running the API Server
python3 -m evrmore_accounts.app
This will start a Flask application with both the API endpoints and a web interface available at http://localhost:5000.
Running the Demo
Open http://localhost:5000/demo in your web browser to see the authentication flow in action.
Integration Example
Check out the simple_integration_example.html file for an example of how to integrate Evrmore Accounts with your web application.
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/challenge |
POST | Generate a challenge for a user |
/api/authenticate |
POST | Authenticate with a signed challenge |
/api/validate |
GET | Validate a JWT token |
/api/user |
GET | Get authenticated user information |
/api/logout |
POST | Invalidate a JWT token (logout) |
JavaScript Library
Add the Evrmore Accounts JavaScript library to your web application:
<script src="https://cdn.manticore.technology/evrmore-accounts.js"></script>
Initialize the library and create a sign-in button:
// Initialize Evrmore Accounts
EvrmoreAccounts.init({
apiUrl: 'http://your-api-server.com/api',
autoRefresh: true,
debug: false
});
// Create a sign-in button
EvrmoreAccounts.initSignInButton('#sign-in-button');
// Listen for authentication state changes
EvrmoreAccounts.onAuthStateChanged(function(user) {
if (user) {
console.log('User is signed in:', user);
// Show authenticated UI
} else {
console.log('User is signed out');
// Show sign-in UI
}
});
Development
Setup Development Environment
# Clone the repository
git clone https://github.com/manticoretechnologies/evrmore-accounts.git
cd evrmore-accounts
# Create a virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip3 install -e .
Running Tests
python3 test_evrmore_accounts.py
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
- Website: manticore.technology
- GitHub: github.com/manticoretechnologies
- Email: dev@manticore.technology
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evrmore_accounts-1.0.0.tar.gz.
File metadata
- Download URL: evrmore_accounts-1.0.0.tar.gz
- Upload date:
- Size: 57.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79163bbe6acb913bb12bca54212e1b7b68cce270fabc99bd0b824b2bf5eb62be
|
|
| MD5 |
6be69a518c0c39ed83bf14c56ab154db
|
|
| BLAKE2b-256 |
6f1323b5da96883841821202baeef49f7789a42b652868bf0ce34a2db50ddee7
|
File details
Details for the file evrmore_accounts-1.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: evrmore_accounts-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 37.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bdcbc557f14e2f1d16380b40acacdbf04ba2fc17e2465af285a481679c88eb9
|
|
| MD5 |
450069b7f006e94136716ab0e193a7ca
|
|
| BLAKE2b-256 |
abc13e121371a8e54fee375894c06b9191bc80876e4366da65b67af0dfe89d0b
|