Search code examples
node.jsreactjspostmanstrapiinsomnia

Whenever I'm going to login or register with strapi 405(method not allowed) message come up


Whenever i'm sending request to strapi for login and register I'm getting error like 405

Image displaying the error in Insomnia


Solution

  • It is because your API route might be wrong. In my case, it's working fine with http://localhost:1337/api/auth/local

    Also, you can check that API route with the below path in your strapi administration panel

    Setting -> USERS & PERMISSIONS PLUGIN -> Roles -> Select Authenticated or Public -> Permissions

    Image for reference