mvp-ai's picture
download
raw
14.1 kB
id,category,option,best_for,avoid_when,tradeoffs,tags,last_verified
DB031,Session Strategy,HTTP-only Session Cookie,"Server-rendered apps or same-origin SPAs where the backend sets the session and the browser handles it automatically","Cross-origin API consumed by a mobile app or third-party client, where cookies don't travel the same way","Browser handles the token for you and HttpOnly mitigates XSS token theft, but requires CSRF protection and a server-side session store (or a signed/encrypted cookie)","session-cookie|same-origin|csrf",2026-07-03
DB032,Session Strategy,JWT Access Token (stateless),"Stateless APIs, mobile apps, or serverless/edge functions that shouldn't hold shared session state","Traditional server-rendered app where cookie sessions are simpler and CSRF protection is already in place","Scales horizontally with no shared session store, but revoking a token before its natural expiry requires an extra mechanism (short expiry + refresh, or a revocation list)","jwt|stateless|mobile",2026-07-03
DB033,Session Strategy,Refresh Token Rotation,"Any JWT-based auth system — issue short-lived access tokens (minutes) plus a long-lived refresh token, rotating the refresh token on each use","Session-cookie-based auth where the session store itself already handles expiry/revocation server-side","Limits the blast radius of a leaked access token (short life) while keeping the user logged in; rotation detects refresh-token theft (reuse of an old rotated token signals compromise)","refresh-token|jwt|token-rotation",2026-07-03
DB034,Passwordless,Magic Link (email-based),"Consumer apps prioritizing low-friction signup/login where users may not want to manage a password","High-frequency logins where waiting for an email each time is real friction — pair with a persistent session so it's a one-time cost","Removes password-related support burden (resets, reuse, breaches) entirely, but login is only as fast as the user's email client and requires a reliable transactional email pipeline","magic-link|passwordless|email",2026-07-03
DB035,Passwordless,One-Time Password (OTP) via SMS or Email,"Markets/users where email delivery is unreliable but SMS is ubiquitous, or as a second factor alongside another primary method","SMS-only OTP as your *only* factor for high-value accounts — SIM-swapping makes SMS the weakest common MFA channel","Familiar UX for many users, but SMS delivery costs money per message and is the least secure common MFA channel due to SIM-swap risk","otp|sms|passwordless",2026-07-03
DB036,Passwordless,Passkeys / WebAuthn,"Products wanting the strongest phishing-resistant auth with the least user friction on supporting devices/browsers","Users on older devices/browsers without WebAuthn support — always offer a fallback method","Phishing-resistant by design (the credential is bound to the origin) and no shared secret to leak from a server breach, but requires a fallback path for unsupported devices and slightly higher implementation complexity than password/magic-link","passkeys|webauthn|phishing-resistant",2026-07-03
DB037,Password-Based,Password + Argon2id Hashing,"Apps that need traditional password auth (enterprise expectation, offline-capable login) — use Argon2id specifically, not MD5/SHA1/bcrypt if starting fresh","A greenfield consumer app with no requirement for passwords at all — prefer passwordless (magic link/passkey) as the primary method instead","Argon2id is the current best-practice hash (memory-hard, resistant to GPU cracking) — bcrypt is an acceptable fallback if your framework/library only supports that, but never roll your own hashing or use fast general-purpose hashes (MD5, SHA family) for passwords","password|argon2|hashing",2026-07-03
DB038,Password-Based,Password Reset via Time-Limited Single-Use Token,"Any system supporting password login — the reset token must expire (typically 15-60 min) and be invalidated after first use","Never applicable to skip — every password-based system needs this flow, and it's a common target for security review","A stolen or replayed reset link should not work after expiry or after one use; always invalidate all existing sessions on successful password reset (DB039)","password-reset|token-expiry|security",2026-07-03
DB039,Password-Based,Invalidate All Sessions on Password Change,"Every password-based auth system, triggered on password reset or explicit password change","Never skip — an attacker who compromised an old session should be logged out the moment the legitimate user changes their password","Closes the window where a compromised session/token remains valid after the user has taken the corrective action of changing their password","session-invalidation|password-change|security",2026-07-03
DB040,Password-Based,Login Attempt Rate Limiting / Account Lockout,"Every password-login endpoint — rate limit by IP and by account to blunt credential-stuffing and brute-force attacks","A rate-limit configuration so aggressive it locks out legitimate users on a shared IP (office/school NAT) — tune thresholds and prefer progressive delays over hard lockouts where possible","Blunts automated credential-stuffing attacks, but must be paired with a clear unlock path (time-based or verified-email-based) so it doesn't become a denial-of-service vector against real users","rate-limiting|brute-force|account-lockout",2026-07-03
DB041,MFA,Time-based One-Time Password (Authenticator App),"The most broadly recommended second factor for account security — works offline, no per-use cost, widely supported (Google/Microsoft/Authy)","Users who will realistically never set up an authenticator app — always pair with a documented recovery-code flow","Strong, free, and offline-capable, but requires users to have set up an authenticator app in advance and to have a backup/recovery-code plan for a lost device","mfa|totp|authenticator",2026-07-03
DB042,MFA,SMS-Based Second Factor,"A lower-friction MFA option to offer alongside TOTP, accepting the security tradeoff for broader adoption","High-value accounts (admin, financial) as the *only* MFA option — SIM-swap attacks specifically target SMS-based MFA","Easier for users to set up than an authenticator app, but meaningfully weaker against a targeted attacker due to SIM-swap risk — offer, don't rely on exclusively","mfa|sms|sim-swap-risk",2026-07-03
DB043,MFA,Recovery Codes,"Every MFA implementation — generate a set of one-time-use backup codes at MFA setup time for when the user loses their second-factor device","Never skip — an MFA system with no recovery path turns a lost phone into a full account lockout, which becomes a costly support burden","Give the user a way back into their account without weakening the MFA guarantee for an attacker who doesn't have the codes; each code is single-use and the set should be regenerable","mfa|recovery-codes|account-recovery",2026-07-03
DB044,Social / Federated,"OAuth 2.0 Social Login (Google, GitHub, etc.)","Reducing signup friction and avoiding password-storage liability entirely for users willing to use an existing identity provider","A product where users specifically don't want a third party to know they use your service (some B2B/privacy-sensitive contexts) — offer email/password or magic link as an alternative","Removes password storage/breach liability for those users and speeds up signup, but ties account recovery to the identity provider's own account-recovery flow if something goes wrong there","oauth|social-login|google|github",2026-07-03
DB045,Social / Federated,Single Sign-On (SAML/OIDC) for B2B Enterprise,"B2B SaaS selling to enterprise customers whose IT department requires centralized identity management via their own IdP (Okta, Azure AD, etc.)","Consumer products or small-team B2B — SSO/SAML implementation and per-customer IdP configuration is real ongoing operational overhead not justified below enterprise deal sizes","Often a hard requirement to close enterprise deals and centralizes access control for the customer's IT team, but adds meaningful implementation and per-customer configuration overhead","sso|saml|oidc|enterprise",2026-07-03
DB046,Authorization Model,Row-Level Security as the Authorization Layer,"Supabase/Postgres apps where 'can this user see/modify this row' should be enforced at the database layer regardless of which code path queries it","Authorization logic that's too dynamic/computed to express as a SQL policy (e.g. depends on an external service call) — enforce that specific case in application code instead","Database-enforced guarantee that survives even a buggy or malicious application-layer bypass attempt; pairs with DB015/DB030 for multi-tenant isolation specifically","rls|authorization|supabase",2026-07-03
DB047,Authorization Model,Role-Based Access Control (RBAC),"Most apps with a handful of clear roles (admin, editor, viewer) where permissions map cleanly to a role, not to fine-grained per-resource rules","Permission logic that varies per resource instance in ways a fixed role can't express (e.g. 'owner of this specific document') — combine with ownership checks or move to ABAC","Simple to reason about and audit ('what can an editor do') but can become a proliferation of near-duplicate roles if requirements get fine-grained enough","rbac|roles|authorization",2026-07-03
DB048,Authorization Model,Attribute-Based / Policy-Based Access Control (ABAC),"Complex authorization requirements where access depends on multiple attributes (user department, resource sensitivity, time of day, relationship to the resource) that RBAC's fixed roles can't express cleanly","Simple apps with a handful of roles — ABAC's flexibility is unneeded complexity there","Handles genuinely complex, multi-factor authorization rules in one evaluated policy, at the cost of being harder to audit at a glance than a fixed role list","abac|policy-engine|authorization",2026-07-03
DB049,Authorization Model,Claims Embedded in JWT (roles/permissions in the token),"Stateless APIs where you want to avoid a DB lookup on every request just to check the caller's role","Permissions that change frequently and need to take effect immediately — a claim baked into a still-valid JWT won't reflect a permission revoked mid-session until the token expires or is refreshed","Avoids a database round-trip per request for authorization checks, but stale claims in a long-lived token are a real risk — keep access-token lifetimes short (pairs with DB033) if using this pattern","jwt|claims|stateless-authz",2026-07-03
DB050,Service Identity,API Key Authentication,"Service-to-service or third-party integrator access where there's no interactive user to log in — issue a scoped, revocable API key per consumer","Interactive end-user-facing auth — API keys are for machine/service consumers, not for a product's own user login","Simple for consumers to use in server-to-server calls, but the key itself is a long-lived bearer credential — scope it minimally, support easy rotation/revocation, and never expose it client-side","api-key|service-to-service|integrations",2026-07-03
DB051,Service Identity,OAuth 2.0 Client Credentials Grant (machine-to-machine),"Service-to-service auth where you want short-lived tokens instead of a long-lived static API key, and both services support OAuth","A quick internal integration where full OAuth client-credentials setup is disproportionate overhead — a scoped API key may be simpler","Short-lived tokens reduce the blast radius of a leaked credential compared to a static API key, at the cost of more setup (token endpoint, client registration) than just issuing a key","oauth|client-credentials|m2m",2026-07-03
DB052,Managed Providers,Supabase Auth,"Projects already on Supabase — get email/password, magic link, social OAuth, and RLS-integrated sessions without standing up separate auth infrastructure","A project needing an identity provider entirely decoupled from its database platform","Auth state integrates directly with RLS policies (`auth.uid()` available in SQL), removing a whole category of 'keep app auth and DB authorization in sync' bugs — but ties you to Supabase's auth model specifically","supabase-auth|managed|rls-integration",2026-07-03
DB053,Managed Providers,Firebase Auth,"Mobile-first apps already using Firebase, needing social login, anonymous auth, and custom claims with minimal setup","Apps needing deep Postgres-level authorization integration (RLS) — Firebase Auth pairs naturally with Firestore, not with a separate SQL database","Extremely fast to set up for mobile with generous free tier, custom claims support role-like authorization, but less naturally integrated if your data layer is a SQL database rather than Firestore","firebase-auth|managed|mobile",2026-07-03
DB054,Managed Providers,NextAuth.js / Auth.js,"Next.js (or similar) apps wanting a self-hosted, DB-agnostic auth library supporting many OAuth providers plus credentials/email, without a third-party managed service dependency","Teams wanting a fully managed, zero-maintenance identity provider — this is a library you host and configure yourself, not a hosted service","Full control and no per-user pricing since you own the infrastructure, but you're responsible for its configuration, session storage adapter, and security updates yourself","nextauth|authjs|self-hosted",2026-07-03
DB055,Managed Providers,"Third-Party Identity Platform (Auth0, Clerk, WorkOS)","Teams wanting a fully managed auth experience (hosted login UI, MFA, SSO, user management dashboard) without building any of it, especially pre-product-market-fit when speed matters most","Cost-sensitive projects at scale — these platforms typically price per monthly active user, which can become a meaningful line item as the user base grows","Fastest path to production-grade auth (MFA, SSO, breach detection, compliance features) built in, at the cost of per-MAU pricing and a dependency on a third party for your login flow's uptime","auth0|clerk|managed-identity",2026-07-03

Xet Storage Details

Size:
14.1 kB
·
Xet hash:
335d4d9c42f262ee050c26f27297534796edbb1afa002d7aabe0d7d367087089

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.