There is many different structure even authentication middleware would be a too messy to audit with. I had try to find a boilderplate of Node.JS or NestJS that I would love to use, on daily basic. Since all the Javascript’s ES6 Standard is landed properly, time to choose the basic poison. I am followed the template of Stephen Doxsee, better than Auth0’s right now, at least right now.

  • NestJS vs Adonis

Although I would also choose and documented boilerplate of ExpressJS, but that too much of scope now, NestJS at least defined a structure, thus simplify the way and forced you to only using certain flow that enforce by NestJS’s Middleware

  1. Git Clone my fork of
  2. Read the for customized deploy step
  3. Setup following to your own environment variable in Management Panel of

The first three environment variable is static, or the secret is defined by you.

The OAUTH2_CLIENT_REGISTRATION_LOGIN_CLIENT_ID and OAUTH2_CLIENT_REGISTRATION_LOGIN_CLIENT_SECRET is provided by Google’s OAuth2 Client. You can refer the tutorial on

The OAUTH2_CLIENT_REGISTRATION_LOGIN_REDIRECT_URI and OAUTH2_CLIENT_REGISTRATION_LOGIN_POST_LOGOUT_REDIRECT_URI is from, you can automate it on and I leave it as a exercise for you. Probably I can update to community when I have time to spin up a machine.

That is. I will go back to worked on boilerplate for NestJS, ExpressJS with firebase Authentication and OAuth2, hopefully their different and the minor different between them.