Compare commits

..

No commits in common. "d889432ce8a403f6a609423eaf458a5904dc5b98" and "1cd3ebf8c5a9413b93ab49c8813dad5c5c547cb2" have entirely different histories.

3 changed files with 2 additions and 9 deletions

View File

@ -2,19 +2,12 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [0.4.1](https://git.odit.services/kauft.es/linkylinky/compare/0.4.0...0.4.1)
- Fixed jwtcount not being recognized [`44830f0`](https://git.odit.services/kauft.es/linkylinky/commit/44830f08bc212f8079b5ac2da3d51eedbe6d5c41)
#### [0.4.0](https://git.odit.services/kauft.es/linkylinky/compare/0.3.0...0.4.0) #### [0.4.0](https://git.odit.services/kauft.es/linkylinky/compare/0.3.0...0.4.0)
> 18 August 2021
- Basic jwt implementation :party: [`75473ca`](https://git.odit.services/kauft.es/linkylinky/commit/75473cabe79975296e473002e16d3abafbd2635e) - Basic jwt implementation :party: [`75473ca`](https://git.odit.services/kauft.es/linkylinky/commit/75473cabe79975296e473002e16d3abafbd2635e)
- Implemented jwtcount basics [`48cc380`](https://git.odit.services/kauft.es/linkylinky/commit/48cc380504206ea08b3a5082f19ad10bdd7cf773) - Implemented jwtcount basics [`48cc380`](https://git.odit.services/kauft.es/linkylinky/commit/48cc380504206ea08b3a5082f19ad10bdd7cf773)
- Implemented jwt count validation and update on logout [`558b69e`](https://git.odit.services/kauft.es/linkylinky/commit/558b69eeaa78ea015473c674d5f919d64128a930) - Implemented jwt count validation and update on logout [`558b69e`](https://git.odit.services/kauft.es/linkylinky/commit/558b69eeaa78ea015473c674d5f919d64128a930)
- Switched to fastify-auth to support multiple auth providers [`6420ffb`](https://git.odit.services/kauft.es/linkylinky/commit/6420ffb055f08348c54cd08a193aba5fe5ebc13a) - Switched to fastify-auth to support multiple auth providers [`6420ffb`](https://git.odit.services/kauft.es/linkylinky/commit/6420ffb055f08348c54cd08a193aba5fe5ebc13a)
- 🚀RELEASE 0.4.0 [`1cd3ebf`](https://git.odit.services/kauft.es/linkylinky/commit/1cd3ebf8c5a9413b93ab49c8813dad5c5c547cb2)
- All authenticated entpoints now accept jwtauth [`2b22063`](https://git.odit.services/kauft.es/linkylinky/commit/2b22063a81193c3d698525a050ef300e542c1f05) - All authenticated entpoints now accept jwtauth [`2b22063`](https://git.odit.services/kauft.es/linkylinky/commit/2b22063a81193c3d698525a050ef300e542c1f05)
#### [0.3.0](https://git.odit.services/kauft.es/linkylinky/compare/0.2.0...0.3.0) #### [0.3.0](https://git.odit.services/kauft.es/linkylinky/compare/0.2.0...0.3.0)

View File

@ -1,6 +1,6 @@
{ {
"name": "@odit/shortener-backend", "name": "@odit/shortener-backend",
"version": "0.4.1", "version": "0.4.0",
"main": "index.js", "main": "index.js",
"license": "MIT", "license": "MIT",
"private": false, "private": false,

View File

@ -56,7 +56,7 @@ fastify.decorate('verifyJWT', function async(request, reply, done) {
.where('username', '=', decoded.payload.user) .where('username', '=', decoded.payload.user)
.limit(1))[0].jwtcount; .limit(1))[0].jwtcount;
if (decoded.payload.jwtcount < jwtcount) { if (decoded.payload.jwtcount < jwtcount || !decoded.payload.jwtcount) {
fastify.log.error("Auth ended at jwtcount") fastify.log.error("Auth ended at jwtcount")
done(new Error("JWT in no longer valid")) done(new Error("JWT in no longer valid"))
} }