Skip to content

Add setGenerateJWT method to update JWT generator after initialization#572

Closed
franco-zalamena-iterable wants to merge 1 commit intoIterable:mainfrom
franco-zalamena-iterable:fix/160-update-generate-jwt-function
Closed

Add setGenerateJWT method to update JWT generator after initialization#572
franco-zalamena-iterable wants to merge 1 commit intoIterable:mainfrom
franco-zalamena-iterable:fix/160-update-generate-jwt-function

Conversation

@franco-zalamena-iterable
Copy link
Copy Markdown

@franco-zalamena-iterable franco-zalamena-iterable commented Apr 7, 2026

Summary

  • Add setGenerateJWT method to allow updating the JWT generator function
  • Enables re-initialization of JWT generation when outer tokens change

Test plan

  • Initialize SDK with JWT, update generateJWT, verify new function is used
  • Verify backward compatibility

🤖 Generated with Claude Code

When using JWT auth, the generateJWT function passed to initialize() gets
captured and never updates. This adds a setGenerateJWT export that allows
updating the function reference at any time, fixing Iterable#160.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.40%. Comparing base (190a168) to head (402a34f).

Files with missing lines Patch % Lines
src/authorization/authorization.ts 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #572      +/-   ##
==========================================
- Coverage   74.45%   74.40%   -0.05%     
==========================================
  Files          57       57              
  Lines        2736     2739       +3     
  Branches      798      798              
==========================================
+ Hits         2037     2038       +1     
- Misses        698      700       +2     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@franco-zalamena-iterable franco-zalamena-iterable deleted the fix/160-update-generate-jwt-function branch April 8, 2026 14:47
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.

2 participants