Create various settings file I have one file for each provider, all in ~/.claude
- KIMI K2.5: kimi_settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.moonshot.ai/anthropic",
TLDR: JWTs should not be used for keeping your user logged in. They are not designed for this purpose, they are not secure, and there is a much better tool which is designed for it: regular cookie sessions.
If you've got a bit of time to watch a presentation on it, I highly recommend this talk: https://www.youtube.com/watch?v=pYeekwv3vC4 (Note that other topics are largely skimmed over, such as CSRF protection. You should learn about other topics from other sources. Also note that "valid" usecases for JWTs at the end of the video can also be easily handled by other, better, and more secure tools. Specifically, PASETO.)
A related topic: Don't use localStorage (or sessionStorage) for authentication credentials, including JWT tokens: https://www.rdegges.com/2018/please-stop-using-local-storage/
The reason to avoid JWTs comes down to a couple different points:
| function ensureJquery(readyCallback) { | |
| if (window.jQuery === undefined || parseFloat(window.jQuery.fn.jquery) < 1.9) { | |
| var js = document.createElement('script'); | |
| js.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"; | |
| if (js.readyState) | |
| js.onreadystatechange = function () { | |
| if (this.readyState == 'complete' || this.readyState == 'loaded') { | |
| jQueryLoadHandler(); | |
| } | |
| }; |
| // See https://blog.isquaredsoftware.com/presentations/react-redux-ts-intro-2020-12/#/36 for slides | |
| // My basic render function structure: | |
| function RenderLogicExample({ | |
| someBoolean, // 1) Destructure values from `props` object | |
| someList, | |
| }) { | |
| // 2) Declare state values | |
| const [a, setA] = useState(0); | |
| const [b, setB] = useState(0); |
Picking the right architecture = Picking the right battles + Managing trade-offs