Skip to content

Conversation

@tysonwil
Copy link
Collaborator

Summary

  • Adds issueJwt(keyIndex:) method to ParaManager for server-side authentication
  • Returns JwtResponse containing the signed token and key ID
  • JWT can be verified using Para's JWKS endpoint at /.well-known/jwks.json

Usage

// After user is authenticated
let jwt = try await para.issueJwt()

// Send to your server
request.setValue("Bearer \(jwt.token)", forHTTPHeaderField: "Authorization")

Server-side verification

import jose from 'jose';

const JWKS = jose.createRemoteJWKSet(
  new URL('https://api.getpara.com/.well-known/jwks.json')
);

const { payload } = await jose.jwtVerify(token, JWKS, {
  audience: 'YOUR_PARA_API_KEY'
});
// payload.sub = userId
// payload.data.wallets = user's wallets

Test plan

  • Build succeeds
  • Call issueJwt() after authentication and verify JWT is returned
  • Decode JWT and verify payload contains expected fields

🤖 Generated with Claude Code

Adds a new `issueJwt()` method that allows clients to request a JWT
for server-side authentication. The JWT can be verified using Para's
JWKS endpoint at `/.well-known/jwks.json`.

The JWT contains:
- sub: userId
- aud: partnerId
- data: session info (wallets, authType, identifier)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@tysonwil tysonwil merged commit f1edfbb into 2.0.0-alpha Dec 11, 2025
2 of 4 checks passed
@tysonwil tysonwil deleted the feature/issue-jwt branch December 11, 2025 22:36
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.

3 participants