strictNullChecks was off for docs, which lets errors slip through and
leads to incorrect required/optional typing on Zod-inferred types. This
PR enables strictNullChecks and fixes all the existing violations.
Fix a UI display issue for the JWT generator: when the dropdown is used
to switch between the anon and service role key, the displayed JWT
claims did not change. The actual state changes, and the keys generated
are correct, but they just don't display because the text area is
controlled andd oesn't sync with the state.
Changed the text are to take a key dependent on the state so the
displayed UI should change properly.
Does _not_ affect the actually generated API keys. Double-checked that
these are the same before and after.
The old JWT generator code provided the anon and authenticated claims as strings. The format of this string is different from the format determined by KJUR if an object is provided (I'm guessing probably a whitespace or quote character thing, but I didn't dive down this rabbit hole.) This leads to incompatibilities when the token is used.
To prevent this, the tokens are now defined as objects and KJUR's own serialization is used.