Nest: Built-in authentication

Created on 8 May 2017  路  8Comments  路  Source: nestjs/nest

Hi, I'm loving nest framework! Great work!

I'd like to suggest this feature request. Not sure if it is in the plan but I think is something it provides extreme value for a higher level framework, since it is something basically all apps need. This would probably mean to adopt an ORM or make adapters for them.

A personal preference of a good framework that has this is FeathersJS, remaining very unopinionated and lean. Although it doesn't have the great TS support that nest has :)

Most helpful comment

@alexjoverm @KerryRitter - I'm still working through a JWT implementation, and will see about sharing/contributing back once I figure something out. In the meantime, I've created a Nest + TypeORM example that's been working out pretty well so far.

More details about the implementation can be found in the repo itself, but you'll see all Nest best practices have been followed and it ended up being rather clean due to the strength of Nest's patterns :)

https://github.com/zachgrayio/nest-typeorm-example

All 8 comments

I agree that this definitely needs to be a part of Nest. It has already been established that Nest will not be "standardizing" an ORM, so we'll need an adapter pattern of some sort to support.

@alexjoverm @KerryRitter - I'm still working through a JWT implementation, and will see about sharing/contributing back once I figure something out. In the meantime, I've created a Nest + TypeORM example that's been working out pretty well so far.

More details about the implementation can be found in the repo itself, but you'll see all Nest best practices have been followed and it ended up being rather clean due to the strength of Nest's patterns :)

https://github.com/zachgrayio/nest-typeorm-example

Might be better to make modules instead of baking it into the framework. Gives people more choice.

Agreed. being able to bring it down as a plugin and including it that way would be a better approach.

To make it as a module would be great. In #6 it's been discussing about making nest in scoped npm packages. It would be great to have the auth module as a scoped pkg as well:

  • @nest/core
  • @nest/cli
  • @nest/auth
  • @nest/....

@zachgrayio that repo looks great. @kamilmysliwiec can we have an "Examples" section on the docs, with some curated links like this one?

Hi guys!
There won't be any built-in authorization to stay Nest flexible as possible, but since Nest is modular it would be great to have the auth module provided, just as @alexjoverm mentioned.

@alexjoverm yes, sure, each useful example / module will be stored in appropriate section on the docs. :)

Any further progress in this idea??

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings