StackSurveyor / stacksurveyor-backend

The Codebase for StackSurveyor's Backend API
GNU General Public License v3.0
4 stars 1 forks source link

Add Login endpoint which returns Access and Refresh JWT #1

Open ahnaf-zamil opened 3 years ago

ahnaf-zamil commented 3 years ago

Right now, we have a registration endpoint which we can use to register a new user. But we need a login endpoint which will return access and refresh JWT tokens for the client to consume.

The access JWT token should last for 15 minutes while the refresh JWT should last for 7 days at least.

It should also have authentication checks to see if the user has entered proper credentials or not (I know it's basic, but still pointing it out), and it should throw errors with proper error codes and messages so that the client can understand and respond accordingly.