layou_auth

Stop blocking users. Start building trust.

A Flutter authentication module that lets users experience your app first, authenticate later.

๐Ÿ“– This README is for everyone - designers, product managers, and developers. We talk UX strategy first, implementation second.

Why?

For years, apps forced users to "Sign up" before even seeing the first screen.

The result? 40% drop-off at the login gate.

The truth: people want to TRY, not fill forms.

Every authentication step between download and your app's "aha moment" is a leak in your funnel.

layou_auth flips the script:

  • Anonymous by default - Users download, explore, and engage without friction
  • Zero barriers - No email, no password, no registration wall
  • Reach the "aha moment" instantly - Let users experience your app's magic first
  • Authenticate when it matters - Link accounts only when users see real value (after purchase, after saving content, after hitting limits)

This is a UX philosophy, not just a technical choice.

If users don't care about losing their data, your onboarding failed.

If users don't want to link their account, your app didn't deliver enough value.

Anonymous login is a truth test. It forces you to create a real reason to stay.

Forced registration is a crutch for apps that don't trust their own value.

Even experienced teams with successful apps are testing this approach - from anonymous-first with progressive CTAs, to pure social login. The common thread? Minimize friction to value.

Features

For Product & UX Teams

  • ๐ŸŽฏ Instant engagement - Users reach your app's value in seconds, not after a form
  • ๐Ÿ“Š Built-in conversion funnel - Anonymous โ†’ engaged โ†’ linked = clear value signal
  • ๐Ÿงช A/B test ready - Test different linking prompts and timings
  • ๐Ÿ’ก Progressive trust building - Earn the right to ask for commitment

For Developers

  • ๐ŸŽญ Anonymous authentication - Get users in instantly with one line of code
  • ๐Ÿ” Multiple auth providers - Email, Google, Apple, and more
  • ๐Ÿ”„ Account linking - Convert anonymous users seamlessly
  • ๐Ÿ›ก๏ธ Secure by default - Built on Firebase Authentication
  • ๐ŸŽจ Customizable UI - Match your brand identity
  • ๐Ÿ“ฑ Flutter-first - Clean, simple, production-ready

Installation

dependencies:
  layou_auth: ^1.0.0

Quick Start

// Initialize with anonymous authentication enabled
LayouAuth.initialize(
  anonymousEnabled: true,
);

// User is automatically logged in anonymously
// They can now explore your app with zero friction
final user = LayouAuth.currentUser;

// Link account when user sees the value
// Example: after purchase, after first save, after hitting a limit
await LayouAuth.linkWithGoogle();

// Or with email
await LayouAuth.linkWithEmail(
  email: 'user@example.com',
  password: 'secure_password',
);

When to prompt account linking

// โœ… After a purchase (they paid, they see the value)
void onPurchaseComplete() {
  showLinkAccountDialog(
    message: "Secure your purchase! Link your account to access on all devices.",
  );
}

// โœ… After meaningful engagement (they're invested)
void onFirstContentCreated() {
  if (LayouAuth.currentUser.isAnonymous) {
    showLinkAccountPrompt();
  }
}

// โŒ On app launch (they haven't seen value yet)
void initState() {
  // DON'T: showLoginWall();
  // DO: Let them explore anonymously
}

Usage

Coming soon - detailed usage documentation

Real-world UX Strategies

Here's what teams are testing in production:

The approach:

  • Users start anonymous by default
  • Multiple CTAs throughout the app to link their account
  • Prompt linking after meaningful engagement (post-paywall, after first save, etc.)

The results:

  • Zero friction at launch โ†’ higher conversion
  • Users experience the "aha moment" before committing
  • Natural filter: if users don't want to link, the app didn't deliver value

Pro tip: For paid users, require account linking post-purchase. Anonymous + payment works for the initial conversion, but linking ensures they can restore purchases and access across devices.

๐Ÿ“ง Email-only

The reality: It can feel restrictive, but if your app truly delivers value, retention stays strong. Some older apps still use this successfully.

๐ŸŽ Apple/Google only

The experiment: Radical but clean. Removes choice paralysis, but be aware:

  • Users might use "Hide My Email" with Apple Sign-In
  • You'll get private relay emails like abc123@privaterelay.appleid.com
  • It works, but plan for anonymous email addresses

The pattern that emerges: The best apps let users reach value instantly, then earn the right to ask for commitment.

Philosophy

This isn't just a package. It's a UX mindset and a technical implementation.

For designers & product people: layou_auth removes the biggest friction point in mobile apps. It's built on the belief that users should experience your app's value before you ask for their trust.

For developers: No boilerplate. No complexity. Just authentication that works. Built for vibes coding - simple, clean, and fast to implement.

For everyone: If your app requires a sign-up wall before showing any value, ask yourself: "Am I protecting my users, or protecting myself from admitting my onboarding isn't compelling enough?"

Anonymous-first auth forces you to build something worth coming back to.

License

Add your license here

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Libraries

layou_auth
Firebase Auth package with Google, Apple, and Email sign-in/linking support.