Lemmy is not very developed in this area. As far as I can tell, JWTs do not expire and there are no refresh tokens. I think instance admins can manually revoke JWT tokens globally, but otherwise they are valid indefinitely. I’m hoping this will be improved, because JWTs are already not the most secure—especially without ttls, 2fa, and refresh tokens
It doesn't look very good, no. It would be good to bring Lemmy to OAut2.1 where the self-contained token with a sensible lifetime is passed in the Authentication header. Currently it's either passed in the URL (GET) or in the model (PUT/POST).
I have some OAuth experience, but I'm not a Rust developer. So, I thought of offering some help regarding design and testing of an OAuth mechanism, but since I cannot really contribute to implementation, that may not be that much of a help. Also, this kind of a change will break at least some of the existing clients. I don't know if the core team would be willing to make such a change.
Lemmy App Development
A place for Lemmy builders to chat about building apps, clients, tools and bots for the Lemmy platform.
On-Topic:
- programming questions related to the Lemmy platform
- sharing your ideas, WIP, or released Lemmy-related work
Off-Topic:
- general programming questions unrelated to Lemmy
- feature requests for developers
- sharing or promoting work not related to Lemmy