Welcome to SVA OAuth Demo

A professional demonstration of the sva-oauth-client package. Experience seamless OAuth 2.0 integration with SVA's identity protocol.

✨ Features Demonstrated

🔒 OAuth 2.0 Authentication

Complete OAuth 2.0 flow with PKCE support. Secure, modern, and production-ready.

🛡️ Protected Views

Use @sva_oauth_required decorator to protect your views easily.

📦 Block Requirements

Require specific identity blocks with @sva_blocks_required decorator.

🔄 Conditional Logic

Adapt your UI based on available identity blocks dynamically.

🌐 REST API

JSON endpoints for blocks data, userinfo, and authentication status.

⚡ Session Management

Automatic token storage and session handling with zero configuration.

🚀 Quick Start

1. Install Package

pip install sva-oauth-client

2. Configure Settings

SVA_OAUTH_BASE_URL = 'https://api.getsva.com' SVA_OAUTH_CLIENT_ID = 'your_client_id' SVA_OAUTH_CLIENT_SECRET = 'your_secret'

3. Protect Views

@sva_oauth_required def my_view(request): blocks = get_blocks_data(request.session) return render(request, 'my_template.html', {'blocks': blocks})

4. Access Blocks

from sva_oauth_client.utils import get_blocks_data blocks = get_blocks_data(request.session) email = blocks.get('email')

📚 Available Endpoints

📊 /dashboard/

Main dashboard showing all available identity blocks with beautiful UI.

👤 /profile/

User profile page requiring email, name, and phone blocks.

⚙️ /settings/

Settings page with conditional block display based on availability.

🔍 /blocks/

Blocks explorer with categorized view of all identity data.

📡 /api/blocks/

JSON API endpoint returning all blocks data.

📡 /api/userinfo/

JSON API endpoint returning user information.

📡 /api/status/

JSON API endpoint for authentication status check.

🚀 /advanced/

Advanced dashboard with token validation and feature detection.

💡 About SVA

SVA (Sovereign Virtual Asset) is a user-sovereign identity protocol designed to rebuild trust on the internet. Our mission is to provide every individual with a single, secure, and private digital identity they truly own and control.

Key Principles: User Sovereignty • Zero-Knowledge Security • Universal Verification

Learn More → getsva.com