Skip to main content

Security

Magical Auth implements multiple layers of security to ensure phone verification is safe and reliable.

Security Features

🔐 Cryptographic Protection

  • Carrier-signed credentials: All credentials are cryptographically signed by the mobile carrier
  • JWT validation: Industry-standard JSON Web Tokens with signature verification
  • Session encryption: End-to-end encryption for sensitive session data
  • TLS 1.3: All API communications use modern TLS encryption

⏱️ Time-based Security

  • 5-minute session expiry: Sessions automatically expire after 5 minutes
  • Single-use credentials: Each credential can only be used once
  • Nonce validation: Prevents replay attacks with unique nonces

🛡️ Access Control

  • API key authentication: All requests require valid API keys
  • Rate limiting: Automatic throttling to prevent abuse
  • IP allowlisting: Optional IP restrictions for production environments

Best Practices

For Backend Implementation

  1. Keep API keys server-side only - Never expose them in client code
  2. Use HTTPS everywhere - Ensure all communications are encrypted
  3. Validate all inputs - Check phone numbers and session data
  4. Handle errors gracefully - Don't expose internal details in error messages
  5. Log security events - Monitor for suspicious activity

For Frontend Implementation

  1. Use official SDKs - They handle security details correctly
  2. Don't cache credentials - Let them expire naturally
  3. Validate responses - Check all data received from APIs
  4. Use Content Security Policy - Restrict resource loading

Compliance

Privacy Standards

  • GDPR compliant: User consent required, data minimization
  • CCPA compliant: California privacy requirements met
  • TCPA compliant: Proper consent for phone verification

Industry Standards

  • OAuth 2.0 compatible: Standard authorization flows
  • OpenID Connect: Identity layer on top of OAuth 2.0
  • W3C Digital Credentials: Browser-native credential management

Security Architecture

┌─────────────┐     HTTPS/TLS     ┌─────────────┐
│ Browser │◄─────────────────►│ Your Server │
└─────────────┘ └─────────────┘
│ │
│ Digital │ API Key +
│ Credentials │ HTTPS/TLS
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ Carrier │◄─────────────────►│ Glide API │
│ Network │ Secure Channel │ Server │
└─────────────┘ └─────────────┘

Threat Mitigation

ThreatMitigation
Man-in-the-middleTLS 1.3, certificate pinning
Replay attacksNonces, single-use credentials
Session hijackingShort expiry, encrypted sessions
API abuseRate limiting, API key validation
Data leakageNo sensitive data in logs

Incident Response

If you suspect a security issue:

  1. Immediately rotate API keys
  2. Contact [email protected]
  3. Review access logs
  4. Implement additional restrictions if needed

Security Updates

We regularly update our security measures. Subscribe to security bulletins at:

Responsible Disclosure

Found a security vulnerability? Please report it responsibly:


For additional security questions, contact our security team.