Skip to content

Document backend token verification and app mode guidance#404

Open
TYRONEMICHAEL wants to merge 2 commits intomainfrom
feat-docs-updates
Open

Document backend token verification and app mode guidance#404
TYRONEMICHAEL wants to merge 2 commits intomainfrom
feat-docs-updates

Conversation

@TYRONEMICHAEL
Copy link
Contributor

@TYRONEMICHAEL TYRONEMICHAEL commented Nov 19, 2025

  • Describe how to grab idToken from userContext and verify it server-side with @civic/auth-verify, and link the FAQ from the React integration guide.
  • Expand the “Bring your app to production” doc with sandbox vs production details plus clearer guidance on Convert vs Duplicate workflows.
  • Add a new FAQ entry walking through backend ID token verification flows with code samples.
    Clarify embedded wallet recovery behavior, emphasizing automatic recovery via reauthentication and MetaKeep limitations.

Added comprehensive documentation on how to verify Civic Auth ID tokens on the backend:

1. **Token Fields section (integration/react.mdx)**:
   - Added note explaining how to access idToken from userContext
   - Included example of using @civic/auth-verify library
   - Corrected misconception about getting tokens from cookies (they're exposed on userContext)
   - Added explanation of JWKS endpoint usage for signature verification

2. **New FAQ item (overview/faqs.mdx)**:
   - "How do I verify ID tokens on my backend?"
   - Complete examples of getting idToken from frontend
   - Basic and advanced verification examples using @civic/auth-verify
   - Explanation of what the library handles (JWKS fetching, caching, signature verification)
   - Client ID validation example

This addresses the issue where kapa bot gave incorrect information about getting tokens from cookies and made no mention of signature verification methods.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant