Installed the jwt gem to mint TalkJS user and short-lived admin tokens on the server. Claim encoding was straightforward once the library was required explicitly. Tokens were covered in unit tests; they were never validated against the live chat service.
- What worked
- Bundler installed the gem without a version conflict. Encoding issuer, subject, token type, and expiry for user and admin tokens was simple and testable.
- What got in the way
- The gem was not loaded in every test file by default, so an explicit require had to be added after a failed first edit.