Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FeathersJs authenticate returning NotAuthenticated: Invalid login

I am following the official guide of feathers js authenticate https://docs.feathersjs.com/guides/chat/authentication.html but it seems like even after following the guide step by step I am unable to generate tokens. Here is the body of my request to http://localhost:3030/authentication

{
    "strategy": "local",
    "email": "[email protected]",
    "password": "12345678"
}

and here is the response I got

{
    "name": "NotAuthenticated",
    "message": "Invalid login",
    "code": 401,
    "className": "not-authenticated",
    "data": {
        "message": "Invalid login"
    },
    "errors": {}
}

I am using Sequilize with MySQL and I have tested my services using postman and they all are working fine (get/post data from the database)

like image 599
Assad Ullah Avatar asked Oct 17 '25 02:10

Assad Ullah


1 Answers

I figured it out. It was not working because the verify method in authentication-local was verifying the password assuming that the password was hashed using their hashing utility method.

Starting the server with debug mode on have helped to figure out this issue

like image 64
Assad Ullah Avatar answered Oct 18 '25 23:10

Assad Ullah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!