thomas4019 / expressa

API creation middleware with an admin interface
MIT License
439 stars 27 forks source link

Useful Things #123

Closed kane-mason closed 4 years ago

kane-mason commented 4 years ago

jwt error: if an error is thrown here, the generic something went wrong error is thrown, because the user cannot be logged in. clients may need a little more detail (for example if expired token) to know how best to react for user. I didnt want to simply pass the jwt error in case it might contain sensitive info so limited the message for now

added options param for doLogin - paves the way for expiring tokens. I have tested this on my project for pasword resets and works fine

created the util object on the router as discussed in #121

moved pgpool from the db object and onto the util object as i think this is a more appropriate place for it, also considering how the db object is iterated over for the admin ui