🔐 Session Validator

Check if your authentication session is valid

Test Your Current Session

Click below to validate your current authentication session. This will check if the authentication cookie is present and valid.

How to Use This Tool

1. After Merchant Login

Complete the merchant email + OTP login flow, then come here and click "Validate Session"

2. Check Result

If session is valid, you'll see your user data. If invalid, you'll see specific error details.

3. Debug Issues

Use the debug information to identify if the problem is missing cookies, expired sessions, or other auth issues.

For Rork Mobile App

Use this endpoint in Rork to validate sessions:

const validateSession = async () => {
  const response = await fetch(
    'https://your-app.base44.com/functions/validateSession',
    {
      method: 'GET',
      credentials: 'include' // CRITICAL
    }
  );
  
  const result = await response.json();
  
  if (result.authenticated) {
    console.log('✅ Session valid:', result.user);
    return result.user;
  } else {
    console.error('❌ Session invalid:', result.error);
    console.log('Debug info:', result.debug);
    // Trigger re-login
    return null;
  }
};