Skip to content

How to Get Your JWT Token from Browser

Method 1: Browser Console (Easiest)

  1. Open your app in the browser (http://localhost:5180)
  2. Open Developer Tools (F12 or Right-click → Inspect)
  3. Go to the Console tab
  4. Paste this code and press Enter:
// Get token from Supabase session
(async () => {
  const { createClient } = await import('https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2/+esm');
  const supabase = createClient(
    'https://orjmlibnlzkyuauaysye.supabase.co',
    'YOUR_ANON_KEY_HERE' // Replace with your actual anon key
  );
  const { data: { session } } = await supabase.auth.getSession();
  if (session?.access_token) {
    console.log('TOKEN:', session.access_token);
    // Copy to clipboard
    navigator.clipboard.writeText(session.access_token);
    console.log('✅ Token copied to clipboard!');
  } else {
    console.log('❌ No session found. Please sign in first.');
  }
})();

Method 2: Direct from Supabase Client (If you're logged in)

In the browser console, if you have access to the supabase client:

const { data: { session } } = await window.supabase?.auth.getSession();
console.log(session?.access_token);

Method 3: From Application Storage

  1. Open Developer Tools (F12)
  2. Go to Application tab (or Storage in Firefox)
  3. Expand Local Storage
  4. Click on your domain (localhost:5180)
  5. Look for keys starting with sb- (Supabase keys)
  6. Find the session data - the access_token is in there