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.
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.