How to Get Your JWT Token from Browser¶
Method 1: Browser Console (Easiest)¶
- Open your app in the browser (http://localhost:5180)
- Open Developer Tools (F12 or Right-click → Inspect)
- Go to the Console tab
- 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¶
- Open Developer Tools (F12)
- Go to Application tab (or Storage in Firefox)
- Expand Local Storage
- Click on your domain (localhost:5180)
- Look for keys starting with
sb-(Supabase keys) - Find the session data - the
access_tokenis in there