Skip to main content

Step 1: Create Template View

Add container element in your Django template:

Step 2: Add JavaScript Initialization

Create a static JavaScript file:

Step 3: Add Django URL Route

Add route to your urls.py:

Step 4: Create Django Views

Implement token generation view:

Step 5 (Optional): Handle Credential Events

Update the JavaScript to handle events:

Step 6: Update CSP

Add to settings.py: