erickit / nest-user-auth Goto Github PK
View Code? Open in Web Editor NEWA starter build for a back end which implements managing users with MongoDB, Mongoose, NestJS, Passport-JWT, and GraphQL.
License: MIT License
A starter build for a back end which implements managing users with MongoDB, Mongoose, NestJS, Passport-JWT, and GraphQL.
License: MIT License
I looked for a long time and found that it was very rare to use schema first, it was basically code first. Besides,nestjs,graphql,mongoose and schema first are preferred at the same time. And when it comes to the optimization you mentioned, you are the first one I have seen, but unfortunately, many years have passed and nestjs has also been upgraded to version 10, is there any plan to upgrade to the latest version? Besides, @apollo/server is now officially recommended. Have you considered upgrading, or do you have new examples to refer to? Thank you
This project is restarting all the time when you use nodemon because of the graphql.clases.ts. You need to ignore it on nodemon.json or find another better solution.
Hi
Thanks for this good example, helped a lot.
I think I found a bug with the expiration date at
nest-user-auth/src/auth/auth.service.ts
Line 108 in cf33a77
setSeconds
does only set the second portion of a Date
object. This would result in an unexpected date.
See explanation about the same with setMilliseconds
here: https://stackoverflow.com/a/12795802
Also https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setSeconds
I think the simplest would be to use getTime()
and setTime()
:
expiration.setTime(expiration.getTime() + expiresIn * 1000);
or
expiration = new Date(expiration.getTime() + expiresIn * 1000));
How do you add swagger to this api? thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.