All-inclusive feature reach Authentication service. Frontend part is based on Next.js and Redux
When considering complex authentication scenarios, one might initially think of using solutions like Keycloak or cloud-based services such as Auth0. However, this app demonstrates that this might not be necessary. It offers a comprehensive authentication solution based on Node.js and Express.js, without relying on additional modules like Passport.js or Object-Relational Mapping (ORM) tools.
The article with explanation of the advanced features
You can see this app in action at www.authdemoapp.com
Backend part of the app can be found here
- Create a new user
- Login with email and password
- 'Remember me' feature to stay logged in
- Logout from the current session
- Delete your own account
- OAuth via Facebook or Google
- Email verification
- Access based on the email verification status
- Change the current password
- Reset the forgotten password
- As admin request a user to change the password
- As admin block a user
- As admin request a user to re-login
- Send the link to restore the deleted account
- Link local account with OAuth accounts
- Prevent some user roles to use OAuth
- Logout from OAuth providers
- 2FA including 2FA with OAuth
- Extending JWT for active users
- Auto logout with timeout counter
- Advanced role based access control
- One login only
- Logout from all devices
- Login as another user
- Require password check for the critical actions
- Sync auth status across browser tab
- Each OAuth provider has its own way to obtain the
client id
and theclient secret
. But usually the process is straightforward. Please refer to the documentation of respective provider. After obtaining theclient id
put it insrc/config/consts.js
in respective constants (FACEBOOK_CLIENT_ID
,GOOGLE_CLIENT_ID
,LINKEDIN_CLIENT_ID
)
- Install dependencies with
npm i
- run
npm run dev
to start the app.
If you have found a bug, please report it in this repository's issues section.
This project is licensed under the GPL license. See the LICENSE file for more info.