3 ms·
>"It's client-side sessions versus server-side sessions, and JWT is just one (bad) option among many for client-side sessions." What you recommend then instead
by bogomipz 10y ago
>"It's client-side sessions versus server-side sessions, and JWT is just one (bad) option among many for client-side sessions."
What you recommend then instead of JWT in a non-Rails environment?
- tptacek 10y agoThe equivalent of ActiveSupport::MessageEncryptor. Virtually every platform has something. Go has crypto/cipher.AEAD. Python has fernet. Most platforms have access to Nacl's "secretbox". All of these things are simpler, safer, and just as effective as JWT.
- elithrar 10y agoAnd even that presumes you want to actually encrypt data to the client: many (most) JWT users are just signing tokens, which makes an alternative to JWTs even simpler. token = data:expiry:hmac(key, data+expiry) is super simple in most languages, is robust, and nacl provides useful helpers for doing this as well.