Feddy Docs
Flutter SDKAuthentication

Authentication

Identify signed-in users so feedback, votes, and comments attribute to a real account instead of a per-install anonymous token.

Feddy is anonymous-first. Once you call Feddy.configure(...), every submission and vote is attributed to a per-install anonymous token (e.g. anon_a1b2c3d4) persisted via shared_preferences. That works fine for apps without sign-in.

If your app does have accounts, call Feddy.identify(...) after sign-in and Feddy reconciles previous anonymous activity to the real user ID — nothing is lost.

Identify after sign-in

Call identify(...) once your app knows who the user is. Like other writes, it's synchronous, fire-and-forget, and never throws.

Minimal — userId only

Feddy.identify(userId: 'user_abc');

With email

Feddy.identify(
  userId: 'user_abc',
  email: 'alice@example.com',
);

Full profile

Feddy.identify(
  userId: 'user_abc',
  email: 'alice@example.com',
  displayName: 'Alice Chen',
  avatarUrl: 'https://example.com/avatar.jpg',
);

Only userId is required. email, displayName, and avatarUrl are optional — pass them as you collect them.

Anonymous reconciliation

If a user submits feedback before signing in, then signs in later, the flow looks like this:

Pre sign-in

Feddy.configure(apiKey: 'fed_xxxxxxxxxxxx');
Feddy.submitRequest(title: 'Add dark mode');
// Attributed to anon_a1b2c3d4

Sign-in happens

Feddy.identify(
  userId: 'user_abc',
  email: 'alice@example.com',
);
// Server links anon_a1b2c3d4 → user_abc

Subsequent activity

Feddy.submitRequest(title: 'Allow custom themes');
// Attributed directly to user_abc

In the dashboard, all three submissions surface under Alice's identity.

Why anonymous-first?

Most "send feedback" actions happen before users have logged in or created an account — frustration is highest at exactly that moment. Forcing sign-in for feedback loses the most valuable data points.

Logout

Clear the configured user and any cached state when the user signs out:

Feddy.reset();

reset() clears the last identified user, manual subscription override, and cached server capabilities. The anonymous token is intentionally preserved so any feedback the user submitted before login still links correctly if they sign in again.

After reset(), subsequent writes attribute to the same anonymous token until you call identify(...) again.

What's next

On this page