AuthenticationJanuary 10, 20268 min read

Password Security for Vibe Coders: Building Secure Authentication

Using Supabase Auth or Firebase? Good choice. But are you making your users use strong passwords? And what about your own accounts? Let's talk password security.

The Two Sides of Password Security

As a vibe coder, you need to think about passwords in two contexts:

Your Own Passwords

The passwords you use for GitHub, Vercel, Supabase, Stripe, and all the services that power your app. If these get compromised, attackers own your infrastructure.

Your Users' Passwords

The passwords your users create for your app. If you allow weak passwords, your users are at risk—and so is your reputation when they get hacked.

What Makes a Password Strong?

Password strength comes down to one thing: how long it takes to guess. This depends on:

1. Length (Most Important)

Every additional character exponentially increases the number of possible combinations. A 16-character password is vastly stronger than an 8-character one with "complex" requirements.

2. Character Variety

Using uppercase, lowercase, numbers, and symbols increases the character set size. But length matters more—"correcthorsebatterystaple" beats "P@ssw0rd!"

3. Randomness

Attackers use dictionaries of common passwords and patterns. "password123!" and "qwerty2024" are in every wordlist. True randomness is key.

Test your password strength with our free Password Strength Checker—it runs entirely in your browser, so your password never leaves your device.

The Vibe Coder's Personal Security Stack

Here's how to secure your own accounts—the ones that control your entire infrastructure:

1

Use a Password Manager

1Password, Bitwarden (free), or Apple Keychain. Generate a unique 20+ character password for every service. You only need to remember one master password.

2

Enable 2FA on Everything

Use an authenticator app (not SMS). Prioritize: GitHub, your email, Vercel/hosting, Supabase/Firebase, domain registrar, Stripe.

3

Use Hardware Keys for Critical Accounts

YubiKey or similar for GitHub, Google, and AWS. Hardware keys are phishing-proof—they verify the actual domain, not just a code.

4

Check for Breaches

Use our Data Breach Checker to see if your email has appeared in any breaches. If it has, change those passwords immediately.

Protecting Your Users

If you're using Supabase Auth or Firebase Auth, password hashing is handled for you. But you still need to think about password policies.

Password Requirements: The Right Way

Minimum 12 characters - Length is the most important factor

Check against breach databases - Block passwords that have been exposed in breaches

Show password strength meter - Help users understand how strong their password is

Encourage passphrases - "correct-horse-battery-staple" is easier to remember than "P@ssw0rd!"

What NOT to Do

Don't require specific character types - "Must have uppercase, number, and symbol" leads to Password1!

Don't force periodic password changes - This leads to password1, password2, password3...

Don't set a maximum length - Let users use long passphrases if they want

Don't block paste - Users should be able to paste from password managers

Implementing in Supabase

Supabase handles password hashing with bcrypt. To add custom validation:

// Client-side validation before signup
function validatePassword(password) {
  const errors = [];

  if (password.length < 12) {
    errors.push('Password must be at least 12 characters');
  }

  // Check against common passwords
  const commonPasswords = ['password123', 'qwerty123', ...];
  if (commonPasswords.includes(password.toLowerCase())) {
    errors.push('This password is too common');
  }

  return errors;
}

// Then signup
const { error } = await supabase.auth.signUp({
  email,
  password,
});

Implementing in Firebase

Firebase Auth also handles hashing. Add client-side validation:

// Validate before createUserWithEmailAndPassword
import { createUserWithEmailAndPassword } from 'firebase/auth';

const errors = validatePassword(password);
if (errors.length > 0) {
  throw new Error(errors.join(', '));
}

await createUserWithEmailAndPassword(auth, email, password);

Bonus: Checking Breached Passwords

The HIBP Pwned Passwords API lets you check if a password has been exposed in a breach, without sending the actual password. It uses k-anonymity:

// Check if password is breached (client-side safe)
async function isPasswordBreached(password) {
  const hash = await sha1(password);
  const prefix = hash.substring(0, 5);
  const suffix = hash.substring(5).toUpperCase();

  const response = await fetch(
    `https://api.pwnedpasswords.com/range/${prefix}`
  );
  const text = await response.text();

  return text.includes(suffix);
}

This sends only the first 5 characters of the SHA-1 hash, so HIBP never sees the actual password. If the password is breached, block it.

Key Takeaways

Use a password manager and unique passwords for all your developer accounts

Enable 2FA on everything, hardware keys for critical accounts

For your users: prioritize length over complexity requirements

Check passwords against breach databases before accepting them

Let Supabase/Firebase handle the hashing—focus on policies and 2FA

Test Your Password Strength

Our free tool analyzes your password locally—it never leaves your browser.

Check Password

Scan Your App's Security

VAS checks for auth vulnerabilities, exposed tokens, and insecure configurations.

Run Scan