You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
example: Apollo Client with Application Passwords (server-side) #44
An example showing how to authenticate Apollo Client with a WordPress Application Password, server-side only.
This mirrors what Faust.js now does: wpengine/faustjs#2676 replaced FAUST_SECRET_KEY with FAUST_APPLICATION_USER / FAUST_APPLICATION_PASSWORD (sent as Basic auth) for the token exchange, logout, and CLI commands like generatePossibleTypes. wpengine/faustjs#2673 documents server-side writes with an Application Password and a scoped role. This example should show the same pattern without Faust.
Acceptance Criteria
Credentials come from WP_APPLICATION_USER / WP_APPLICATION_PASSWORD env vars and are only used in server code (server components, route handlers or getServerSideProps); they are never exposed to the browser
An Apollo link that adds the Authorization: Basic header on the server
A codegen step that generates possibleTypes (and TS types) via introspection using the same credentials; examples/next/apollo-authentication/example-app/codegen.ts is a starting point
README explains why Application Passwords must stay server-side
Notes
Authenticated requests shouldn't go through GET / persisted-query caching, so auth with persisted queries is out of scope; the README can briefly explain why.
changed the title [-]example: Apollo client & application passwords[/-][+]example: Apollo Client with Application Passwords (server-side)[/+]on Oct 27, 2026
Activity
[-]example: Apollo client & application passwords[/-][+]example: Apollo Client with Application Passwords (server-side)[/+]