Coder Social home page Coder Social logo

erickit / nest-user-auth Goto Github PK

View Code? Open in Web Editor NEW
294.0 6.0 41.0 803 KB

A starter build for a back end which implements managing users with MongoDB, Mongoose, NestJS, Passport-JWT, and GraphQL.

License: MIT License

TypeScript 100.00%
mongodb mongoose nodemailer passportjs passport-jwt graphql apollo-server jest supertest nestjs

nest-user-auth's People

Contributors

dependabot[bot] avatar erickit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nest-user-auth's Issues

Is it really rare to use pattern first and mongoose optimization together

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

Bug with nodemon

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.

Expiration Bug

Hi
Thanks for this good example, helped a lot.
I think I found a bug with the expiration date at

expiration.setSeconds(expiration.getSeconds() + expiresIn);

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)); 

Swagger

How do you add swagger to this api? thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.