22mahmoud / deno_crud_jwt

🦕 basic jwt implementation with CRUD operations using deno + postgres
98 stars 14 forks source link

Suggestion: Use middlewares? #3

Open halvardssm opened 4 years ago

halvardssm commented 4 years ago

Hi! I made some middlewares for Oak, which you might enjoy (seeing you are using djwt).

One of the middlewares is for JWT validation (though I see you already have your own implementation of this). If you would like to use this middleware, I would love some feedback 👍

I have two other middlewares as well, but I am not sure if you might need them. One is for request-body and parameter validation (very much still in development, but works), and the other one is for logging and error handling.

Hope this is useful for you 🚀

gungunfebrianza commented 4 years ago

hello halvardssm gonna test your framework, tq

gungunfebrianza commented 4 years ago

Trying to test this code but seems buggy and the module used here is obselete, gonna rewrite the new one.

halvardssm commented 4 years ago

Oh? Which parts are obsolete?

gungunfebrianza commented 4 years ago
  1. first in the nessi module, we need to import dbDialects and nessieConfig.
  2. when we try to compare hashed password author forgot to add await statement (source model user.ts)
  3. wrong logic after we compare hashed password

honestly, will make new comer desperate.