Free age verification for any website
This service provides a centralized age verification system that any website can use. Instead of building your own age verification, simply redirect users here with the required age and your return URL. After verification, users are redirected back to your site with a confirmation token.
Send users to our verification page
Users enter their date of birth
Verified users return to your site
Two approaches: direct parameters (simple) or encoded parameters (recommended)
<a href="https://redirectpass.com/?age=21&redirect=https://yoursite.com/restricted">
    Verify Age (21+)
</a>
                    <?php
$params = [
    'age' => 21,
    'redirect' => 'https://yoursite.com/restricted'
];
$encoded = base64_encode(json_encode($params));
$url = "https://redirectpass.com/?p=" . urlencode($encoded);
?>
<a href="<?php echo $url; ?>">Verify Age</a>
                    <?php
if (isset($_GET['verified']) && $_GET['verified'] == '1') {
    // User successfully verified their age
    session_start();
    $_SESSION['age_verified'] = true;
    header("Location: /restricted-content");
} elseif (isset($_GET['cancelled'])) {
    // User cancelled or is underage
    header("Location: /");
}
?>
                    Client-side integration for SPAs and dynamic applications
function verifyAge(requiredAge = 18, redirectUrl = null) {
    const params = {
        age: requiredAge,
        redirect: redirectUrl || window.location.href
    };
    const encoded = btoa(JSON.stringify(params));
    window.location.href = 
        `https://redirectpass.com/?p=${encodeURIComponent(encoded)}`;
}
// Usage
verifyAge(21, 'https://yoursite.com/restricted');
                    class AgeVerification {
    constructor(serviceUrl = 'https://redirectpass.com') {
        this.serviceUrl = serviceUrl;
    }
    
    verify(requiredAge = 18, redirectUrl = null) {
        return new Promise((resolve, reject) => {
            const params = {
                age: requiredAge,
                redirect: redirectUrl || window.location.href
            };
            const encoded = btoa(JSON.stringify(params));
            window.location.href = `${this.serviceUrl}/?p=${encodeURIComponent(encoded)}`;
        });
    }
    
    checkVerificationResult() {
        const urlParams = new URLSearchParams(window.location.search);
        return {
            verified: urlParams.get('verified') === '1',
            cancelled: urlParams.get('cancelled') === '1',
            token: urlParams.get('token')
        };
    }
}
// Usage
const ageVerifier = new AgeVerification();
const result = ageVerifier.checkVerificationResult();
if (result.verified) {
    console.log('Age verified!');
} else if (result.cancelled) {
    console.log('Verification cancelled');
}
                    For Flask, Django, or any Python web framework
import base64
import json
from flask import Flask, redirect, request, url_for
from urllib.parse import urlencode
app = Flask(__name__)
def create_verification_url(required_age=18, redirect_url=None):
    params = {
        'age': required_age,
        'redirect': redirect_url or request.url
    }
    encoded = base64.b64encode(json.dumps(params).encode()).decode()
    return f"https://redirectpass.com/?p={urlencode({'': encoded})[1:]}"
@app.route('/restricted')
def restricted_content():
    # Check if user is verified
    if request.args.get('verified') == '1':
        # Age verified, grant access
        return "Welcome to restricted content!"
    elif request.args.get('cancelled') == '1':
        # User cancelled verification
        return redirect(url_for('home'))
    else:
        # Redirect to age verification
        verification_url = create_verification_url(21, request.url)
        return redirect(verification_url)
@app.route('/')
def home():
    return '<a href="/restricted">Access Restricted Content</a>'
                    # views.py
import base64
import json
from django.shortcuts import redirect
from django.http import HttpResponse
from urllib.parse import urlencode
def create_verification_url(request, required_age=18, redirect_url=None):
    params = {
        'age': required_age,
        'redirect': redirect_url or request.build_absolute_uri()
    }
    encoded = base64.b64encode(json.dumps(params).encode()).decode()
    return f"https://redirectpass.com/?p={urlencode({'': encoded})[1:]}"
def restricted_view(request):
    if request.GET.get('verified') == '1':
        return HttpResponse("Welcome to restricted content!")
    elif request.GET.get('cancelled') == '1':
        return redirect('home')
    else:
        verification_url = create_verification_url(request, 21)
        return redirect(verification_url)
                    For Express.js and other Node.js frameworks
const express = require('express');
const app = express();
function createVerificationUrl(requiredAge = 18, redirectUrl) {
    const params = {
        age: requiredAge,
        redirect: redirectUrl
    };
    const encoded = Buffer.from(JSON.stringify(params)).toString('base64');
    return `https://redirectpass.com/?p=${encodeURIComponent(encoded)}`;
}
// Middleware to check age verification
function requireAgeVerification(requiredAge = 18) {
    return (req, res, next) => {
        if (req.query.verified === '1') {
            // Age verified, continue
            next();
        } else if (req.query.cancelled === '1') {
            // User cancelled, redirect to home
            res.redirect('/');
        } else {
            // Redirect to age verification
            const currentUrl = `${req.protocol}://${req.get('host')}${req.originalUrl}`;
            const verificationUrl = createVerificationUrl(requiredAge, currentUrl);
            res.redirect(verificationUrl);
        }
    };
}
// Protected route
app.get('/restricted', requireAgeVerification(21), (req, res) => {
    res.send('Welcome to restricted content!');
});
app.get('/', (req, res) => {
    res.send('<a href="/restricted">Access Restricted Content</a>');
});
app.listen(3000, () => {
    console.log('Server running on port 3000');
});
                    For ASP.NET Core applications
using Microsoft.AspNetCore.Mvc;
using System.Text;
using System.Text.Json;
public class AgeVerificationController : Controller
{
    private string CreateVerificationUrl(int requiredAge = 18, string redirectUrl = null)
    {
        var parameters = new
        {
            age = requiredAge,
            redirect = redirectUrl ?? Request.GetDisplayUrl()
        };
        
        var json = JsonSerializer.Serialize(parameters);
        var encoded = Convert.ToBase64String(Encoding.UTF8.GetBytes(json));
        
        return $"https://redirectpass.com/?p={Uri.EscapeDataString(encoded)}";
    }
    
    [HttpGet]
    public IActionResult Restricted()
    {
        if (Request.Query["verified"] == "1")
        {
            return Content("Welcome to restricted content!");
        }
        else if (Request.Query["cancelled"] == "1")
        {
            return RedirectToAction("Index", "Home");
        }
        else
        {
            var verificationUrl = CreateVerificationUrl(21);
            return Redirect(verificationUrl);
        }
    }
}
                    For Spring Boot and other Java frameworks
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.view.RedirectView;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
@Controller
public class AgeVerificationController {
    
    private final ObjectMapper objectMapper = new ObjectMapper();
    
    private String createVerificationUrl(int requiredAge, String redirectUrl) throws Exception {
        Map<String, Object> params = new HashMap<>();
        params.put("age", requiredAge);
        params.put("redirect", redirectUrl);
        
        String json = objectMapper.writeValueAsString(params);
        String encoded = Base64.getEncoder().encodeToString(json.getBytes(StandardCharsets.UTF_8));
        
        return "https://redirectpass.com/?p=" + URLEncoder.encode(encoded, StandardCharsets.UTF_8);
    }
    
    @GetMapping("/restricted")
    public Object restrictedContent(
            @RequestParam(required = false) String verified,
            @RequestParam(required = false) String cancelled,
            HttpServletRequest request) throws Exception {
        
        if ("1".equals(verified)) {
            return "restricted-content"; // Return view name
        } else if ("1".equals(cancelled)) {
            return new RedirectView("/");
        } else {
            String currentUrl = request.getRequestURL().toString();
            String verificationUrl = createVerificationUrl(21, currentUrl);
            return new RedirectView(verificationUrl);
        }
    }
}
                    For Ruby on Rails applications
# app/controllers/application_controller.rb
require 'base64'
require 'json'
class ApplicationController < ActionController::Base
  private
  
  def create_verification_url(required_age = 18, redirect_url = nil)
    params = {
      age: required_age,
      redirect: redirect_url || request.original_url
    }
    encoded = Base64.encode64(params.to_json).strip
    "https://redirectpass.com/?p=#{CGI.escape(encoded)}"
  end
  
  def require_age_verification(required_age = 18)
    if params[:verified] == '1'
      # Age verified, continue
      return true
    elsif params[:cancelled] == '1'
      # User cancelled
      redirect_to root_path
      return false
    else
      # Redirect to age verification
      verification_url = create_verification_url(required_age)
      redirect_to verification_url
      return false
    end
  end
end
# app/controllers/restricted_controller.rb
class RestrictedController < ApplicationController
  before_action -> { require_age_verification(21) }, only: [:show]
  
  def show
    render plain: 'Welcome to restricted content!'
  end
end
                    Direct HTTP requests and testing
# Simple GET request
curl "https://redirectpass.com/?age=21&redirect=https://yoursite.com/restricted"
# With user agent
curl -H "User-Agent: MyApp/1.0" \
     "https://redirectpass.com/?age=21&redirect=https://yoursite.com/restricted"
                    # Create encoded parameters
PARAMS='{"age":21,"redirect":"https://yoursite.com/restricted"}'
ENCODED=$(echo -n "$PARAMS" | base64)
# Make request
curl "https://redirectpass.com/?p=$ENCODED"
                    # Using wget
wget -O - "https://redirectpass.com/?age=21&redirect=https://yoursite.com/restricted"
# Save response
wget -O response.html "https://redirectpass.com/?age=18&redirect=https://yoursite.com/welcome"
                    // After successful verification, users are redirected back with:
?verified=1&token=abc123...
// After cancellation or underage:
?cancelled=1
            Basic verification through the return parameters is sufficient for most use cases. However, advanced token validation endpoints are available for applications requiring additional security measures.
The verification token enables several security enhancements for high-security applications:
Verify the token was issued for your specific domain
Check if verification happened recently (within X minutes)
Prevent abuse by tracking verification frequency
Keep records of all verification attempts
// Example: Advanced token validation (PHP)
function validateVerificationToken($token, $expectedDomain = null) {
    // Make API call to validation endpoint
    $url = "https://redirectpass.com/validate?token=" . urlencode($token);
    if ($expectedDomain) {
        $url .= "&domain=" . urlencode($expectedDomain);
    }
    $validation = json_decode(file_get_contents($url), true);
    return $validation['valid'] && $validation['time_remaining'] > 0;
}
                            // Basic validation
GET https://redirectpass.com/validate?token=TOKEN_HERE
// Validation with domain check
GET https://redirectpass.com/validate?token=TOKEN_HERE&domain=yoursite.com
// Revoke a token
GET https://redirectpass.com/validate?action=revoke&token=TOKEN_HERE
                            
                                    Test the validation: After completing an age verification, you can test the validation endpoint at:
                                    https://redirectpass.com/validate?token=YOUR_TOKEN
                                
age - Required age (default: 18)redirect - Return URL after verificationDomain is automatically extracted from the redirect URL
verified=1 - Age verifiedtoken - Verification tokencancelled=1 - User cancelledTry these example links to see how it works:
This is a free service. No API keys required.
Questions? Email: [email protected]