Skip to content

Instantly share code, notes, and snippets.

@lightningspirit
Created August 22, 2022 00:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lightningspirit/5f8a1aff58a0f944cf9333e511870411 to your computer and use it in GitHub Desktop.
Save lightningspirit/5f8a1aff58a0f944cf9333e511870411 to your computer and use it in GitHub Desktop.
Includes a WPGraphQL JWT token in every posts preview link

WPGraphQL JWT in Preview Link

Includes a WPGraphQL JWT token in every posts preview link. That can be used for an external application (e.g. Next.js) to include in the authorization header when contacting back the WordPress instance using the WPGraphQL.

Usage

  1. Install both WPGraphQL and WPGraphQL JWT Authentication
  2. Download this ZIP
  3. Upload to plugins
  4. Activate it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment