I am building an API for mobile application using Password Grant Tokens. When user tries to login to the application, client sends a request for the access token.
It is possible that the user has not verified his account using the link sent to his email. I wish to add an additional condition to the query and provide error response accordingly. Currently, as Passport manages token part, I can't do it directly.
How can this be solved? How can I dive in the token request and send custom response if there are any issues with user account? And continue sending token otherwise.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire