Authie.Start building
Tokens and credentials

Which credential do I use?

Most applications need a client ID, a backend-only client secret, and the user tokens produced during login. Management tokens are only for provisioning automation.

What the React SDK can access

@authie/nextjs/react reads a small session response from your application’s same-origin backend: the user ID, name, email, verification status, and optional image. It does not receive the secret key, authorization code, access token, or refresh token.

The complete map

CredentialRepresentsWhere it belongsUsed for
Developer sessionYou, signed into the Authie consoleYour browserManual configuration
Management tokenAn organization administratorTrusted CLI, CI, or local provisioning processCreating applications and OAuth clients
Client IDOne OAuth integrationBackend or public clientIdentifying the application during OIDC
Client secretA confidential OAuth clientBackend secret storage onlyAuthenticating the client at the token endpoint
Authorization codeOne completed login attemptShort-lived callback handlingExchanging for tokens
ID tokenThe authentication eventBackend/session layerEstablishing the local session after validation
Access tokenPermission to call an API for this user and applicationTrusted backend; protected storage for public clientsCalling /me, /status, and permitted APIs
Refresh tokenPermission to obtain replacement access tokensServer-side or OS-protected storageKeeping a session alive through rotation

Why the management token exists

Creating an OAuth client is a control-plane operation. It establishes redirect URIs that Authie will trust, chooses whether a secret exists, and determines which organization owns the resulting application. A normal user token must not have that authority.

The client secret cannot do this job either: it does not exist until after the client is created, and it identifies one client rather than the organization that is allowed to create clients.

What it should do

Create organization-owned applications and their OAuth clients from a trusted automation environment.

What it must never do

Power login, sit in frontend code, travel with application requests, or become Storytail’s general-purpose API key.

Management-token protections

  • Organization-scoped
  • Shown only once
  • Stored by Authie as a SHA-256 digest
  • Optionally expiring
  • Individually revocable
  • Auditable when it creates an application

See Management API when you actually need provisioning automation.