thevahidal / soul

🕉 A SQLite REST and realtime server
https://thevahidal.github.io/soul/
MIT License
1.45k stars 49 forks source link

Add logout API #175

Closed AbegaM closed 3 months ago

AbegaM commented 3 months ago

Modifications

  1. Added a logout API to remove access and refresh tokens
AbegaM commented 3 months ago

Hello @thevahidal, we have been discussing the storage of "revoked refresh tokens" and we are concerned about the size of the table. Therefore, we are considering implementing a feature that periodically removes these "refresh tokens" every 2 or 3 days. One possible approach is to use the setTimeout function in JavaScript to trigger the removal process every x days. Alternatively, we could use existing cron libraries. Could you please let us know your thoughts on this?

AbegaM commented 3 months ago

Hello @thevahidal, I have pushed a change, and the reason i was using the refToken name was because the refreshToken variable name was already taken in the function, but now i have changed refToken to refreshTokenFromCookies