ReflectionsProjections / rp-api-2023

Core Backend API Layer for Reflections | Projections 2023, powered by Nest.js
MIT License
0 stars 0 forks source link

Add Authentication and Session Management to RP Core #6

Closed xuxey closed 1 year ago

xuxey commented 1 year ago

This PR adds an AuthModule and AuthGuard that abstract away all user authentication actions via three endpoints:

AuthGuard is a guard that can be applied on protected endpoints. It checks for a valid signed JWT token from the incoming request, and attaches the decrypted payload to the request for convenience.

Some additional improvements added are:

Note: This PR only deals with authentication, NOT authorization. Next steps are to add an internal authorization layer to grant access to staff accounts automatically.