Authie.Start building
Coding agents

Give Codex one reliable Authie guide.

Codex can integrate an existing Authie application or provision one first by reading the same public documentation a developer uses.

Integrate an application you configured manually

Create the application and OAuth client in the console, put the resulting values in your project’s local environment, then give Codex this prompt:

Read https://authie.ai/docs/quickstart and
https://authie.ai/docs/authentication, then integrate this application
with Authie.

For a Next.js application, install only @authie/nextjs, use
@authie/nextjs/react for the drop-in UI, and use the SDK's same-origin routes.
Use OIDC discovery and
Authorization Code with S256 PKCE. Keep tokens and
the confidential client secret server-side. Use the access token to call
/api/v1/{applicationId}/me, and add tests for callback validation, refresh,
logout, disabled users, and cross-application token rejection.

NEXT_PUBLIC_AUTHIE_PUBLISHABLE_KEY and AUTHIE_SECRET_KEY are already available.
Do not print or commit them.

Let Codex provision the application

Create a short-lived management token and set it in the trusted local environment—not in the chat message or the application’s deployed environment.

AUTHIE_URL=https://authie.ai
AUTHIE_MANAGEMENT_TOKEN=authie_pat_...

Then use:

Read https://authie.ai/docs/codex and use the Authie Management API to
provision a confidential web application named Storytail.

Origin: https://storytail.example
Callback: https://storytail.example/api/auth/callback/authie

After provisioning, integrate OIDC authentication. The management token is
for provisioning only: never copy it into Storytail, print it, or commit it.