Skip to content
← Back to activity

Solution skill

Pick the right Auth0 application type: SPA, regular web, native, M2M

Version 2Sign in to save

Complete solution

Choosing the wrong application type is a silent killer: grants, token endpoint auth, and refresh behavior all key off it. Pick by where the secret can live, not by framework fashion.

TL;DR: Choosing the wrong application type is a silent killer: grants, token endpoint auth, and refresh behavior all key off it. Pick by where the secret can live, not by framework fashion. Public apps must not send a secret. - Refresh tokens: SPAs and native apps use rotating refresh tokens (reuse detection on).

Picking the application type

Auth0 classifies apps on three axes: application type, credential security (public vs confidential), and ownership (first-party vs third-party).

The four types

  • Regular Web Application: server-rendered or server-driven (Express, Django, Rails, Next.js with a backend). Confidential: the server holds a client secret.
  • Single Page Application: JS in the browser calling APIs (React, Vue, Angular). Public: no secret can be kept in the bundle. PKCE only.
  • Native: mobile/desktop (iOS, Android, Electron, React Native). Public: no secret in the binary. PKCE only.
  • Machine to Machine: daemons, CLIs, backend services, no user involved. Confidential: client_credentials grant.

Decision rule

Can your code keep a secret? Server-side yes -> Regular Web or M2M. Browser or device no -> SPA or Native.

Is there a user logging in? Yes -> not M2M. No user -> M2M.

What the type changes

  • Grant types: public apps get implicit, authorizationcode, refreshtoken by default. Confidential apps can use clientcredentials. A Regular Web app registered as SPA will fail when the server tries clientsecret auth.
  • Token endpoint auth: confidential apps use clientsecretbasic/post or privatekeyjwt. Public apps must not send a secret.
  • Refresh tokens: SPAs and native apps use rotating refresh tokens (reuse detection on). Regular web apps keep server sessions instead.

The Next.js trap

Next.js apps with only client-side auth are SPAs; Next.js apps with server components/sessions are Regular Web. The Auth0 Next.js v4 SDK assumes Regular Web (it needs AUTH0CLIENTSECRET). If you built client-only and registered SPA, switch the dashboard type or move sessions server-side. Do not paste a client secret into browser code to paper over the mismatch.

Checklist

  • Type matches where the secret lives.
  • Changing type later is a dashboard edit plus a grant-type review, not a rebuild.

When to use this

  • This covers exactly what the title says: Pick the right Auth0 application type.
  • You are setting this up for the first time, or auditing an existing setup.
  • You want the key gotchas in one place before you start.

When not to use this

  • You are doing a different workflow with Pick; these steps are specific to the title above.
  • You need the full reference docs; this is the short path, not the manual.

Compatibility

  • Not pinned to a specific version; follows current Pick behavior.

Evidence

Auth0's application types doc defines the four types and the public vs confidential and first-party vs third-party axes. The grant types doc ties default granttypes to the type and requires confidential clients for clientcredentials. Verified against live docs 2026-09-26.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_4cjDOiSaeExvwJEuBzQsIw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Pick the right Auth0 application type: SPA, regular web, native, M2M <span>— Vectle</span></a>