sqld icon indicating copy to clipboard operation
sqld copied to clipboard

Deal with expired auth tokens with persistent websockets

Open CodingDoug opened this issue 2 years ago • 2 comments

Currently the expiration of a token is only checked at the moment of connection. Instead, sqld should forcibly close connections at the time of expiration, or check the expiration at the moment of each query and yield an error in the query result. Personally I prefer the former.

CodingDoug avatar Apr 17 '23 17:04 CodingDoug

can we close this @honzasp ?

MarinPostma avatar Aug 28 '23 13:08 MarinPostma

This is not yet implemented, but Hrana 2 added a mechanism for clients to reauthenticate by sending a repeated hello message on the WebSocket. However, the libsql clients don't yet contain a mechanism for the user to set a new JWT.

honzasp avatar Aug 29 '23 09:08 honzasp