Overview
VCVerifier implements SIOP-2 (Self-Issued OpenID Provider v2) and OIDC4VP (OpenID Connect for Verifiable Presentations) authentication flows. This page provides a detailed explanation of the complete authentication process, including different flow types, states, and error handling.VCVerifier acts as a Relying Party (RP) or Verifier in these flows, requesting and verifying credentials from user wallets.
Flow Types
VCVerifier supports three primary authentication flow types:Cross-Device Flow
User scans QR code with mobile wallet (most common)
Same-Device Flow
Credential held on the same device as the browser
API Flow
Programmatic M2M authentication
Complete Authentication Sequence
Cross-Device Flow (QR Code)
This is the most common flow for human-to-machine interactions.Same-Device Flow
Used when the credential is held on the same device as the browser.API Flow (M2M)
Programmatic flow for machine-to-machine integrations.Request Modes
VCVerifier supports three modes for encoding authorization requests:Mode Comparison
| Mode | QR Size | Security | Wallet Support | Recommended |
|---|---|---|---|---|
| urlEncoded | Small | Basic | High | Development |
| byValue | Large | High | Medium | Limited use |
| byReference | Small | High | High | Production |
URL Encoded Mode
All parameters are directly included in the openid:// URL:- Quick testing and development
- Simple credential requests
- Wallets with limited JWT support
By Value Mode
Parameters are encoded in a signed JWT passed as therequest parameter:
clientIdentificationmust be configured with signing keys- Supported algorithms: ES256, RS256
- JWT must be signed with verifier’s private key
- High security requirements
- Complex presentation definitions
- When request integrity is critical
Requires proper
clientIdentification configuration including keyPath, requestKeyAlgorithm, and optionally certificatePath.By Reference Mode (Recommended)
A reference URI points to where the request object can be retrieved:- ✅ Small QR codes (better scanability)
- ✅ No URL length limitations
- ✅ Request signing support
- ✅ Dynamic request generation
- ✅ Better privacy (request not in URL)
- Production deployments
- Complex presentation definitions
- High security environments
Best Practice: Use
byReference mode for production deployments to ensure small QR codes and maintain request integrity through signing.Authentication States
The authentication flow progresses through several states:State Descriptions
User navigates to login page; session state is created
QR code is displayed containing openid:// connection stringTimeout: 30 seconds (default)
Wallet has scanned QR and parsed authorization request
Wallet is waiting for user to approve or deny credential sharing
VCVerifier has received vp_token and presentation_submission
Multi-step verification process is in progress:
- WaltID SSIKit policy validation
- Trusted participants list check
- Trusted issuer verification
- Holder validation (if enabled)
All verification checks passed; credential is trusted
One or more verification checks failedCommon causes: Untrusted issuer, expired credential, invalid signature
JWT access token has been created with credential claims
Frontend application has been notified via callback URL
Client has exchanged authorization code for JWT token
Verification Process
When VCVerifier receives a credential presentation, it performs multiple verification steps:Verification Steps
1. Format Validation
Checks:- VP token is valid Base64URL-encoded string
- Presentation submission is valid JSON
- Required fields are present
Accepts all credentials (not recommended for production)
Uses JSON-LD parser for structural validation
Validates only specified fields and values; no extra fields allowed
Full validation with both JSON-LD and schema checks (recommended)
2. WaltID SSIKit Policy Validation
Policies Checked:- Signature validity
- Credential expiration
- Credential status (revocation)
- Schema compliance
- Issuer DID resolution
3. Trusted Participants Verification
VCVerifier supports multiple types of participant registries:EBSI TIR
EBSI Trusted Issuers Registry for EU compliance
Gaia-X Registry
Gaia-X Digital Clearing House registry
4. Trusted Issuer Verification
Steps:- Extract issuer DID from credential
- Query configured Trusted Issuers Lists
- Verify issuer is authorized for credential type
- Check issuer’s allowed claims (if configured)
If multiple lists are configured, the issuer is considered trusted if found in any of the lists.
5. Holder Verification (Optional)
WhenholderVerification.enabled is true:
Checks:
- Holder claim exists in credential
- Holder DID matches presentation proof
- Holder’s signature is valid
Error Handling
Error Scenarios
Cause: Authentication session expired (default: 30 seconds)Response:Solution: Initiate a new authentication flow
Cause: Required query parameter not providedResponse:Solution: Include all required parameters in the request
Cause: VP token or presentation submission is malformedResponse:Solution: Ensure proper Base64URL encoding (RFC 4648 Section 5)
Cause: Credential failed WaltID SSIKit policy checksCommon Issues:
- Expired credential
- Invalid signature
- Revoked credential
- Schema mismatch
Cause: Issuer not found in any configured Trusted Issuers ListResponse:Solution: Ensure issuer is registered in the appropriate trust registry
Cause: Holder not found in configured Trusted Participants ListsSolution: Register participant in the appropriate trust registry
Cause: Holder verification failed (when enabled)Common Issues:
- Holder DID doesn’t match proof
- Holder claim missing from credential
- Invalid holder signature
Cause: Code is invalid, expired, or already usedResponse:Solution: Complete the authentication flow again to get a new code
Error Recovery Flow
Security Considerations
Replay Attack Prevention
- Nonce: Each authorization request includes a unique nonce
- State: Session-specific state prevents CSRF attacks
- Code Expiry: Authorization codes are single-use and expire quickly
- Session Timeout: Authentication sessions expire after 30 seconds
Trust Establishment
JWT Token Structure
After successful verification, VCVerifier issues a JWT access token:JWT Header
JWT Payload
The JWT contains the verified credential as claims:Important: Currently, only the first credential in multi-credential presentations is included in the JWT.
Integration Examples
Frontend Integration
Backend JWT Verification
API Flow (M2M)
Best Practices
Use byReference Mode
Generates smaller QR codes and supports request signing
Configure Session Timeout
Adjust sessionExpiry based on your use case (default: 30s)
Verify JWT on Backend
Always verify JWT signatures using the JWKS endpoint
Monitor Trust Registries
Regularly update trusted issuers and participants lists
Use HTTPS Only
Never use HTTP in production environments
Implement Rate Limiting
Protect endpoints at the API gateway level
Known Limitations
Next Steps
API Overview
Complete API endpoint reference
Configuration Guide
Learn how to configure VCVerifier
Trust Anchors
Configure trusted issuers and participants
Deployment
Deploy VCVerifier to production