Login returns 500: Internal server error #54
Comments
Which version of the |
its 0.1.2. Was it broken due to the feathers updating? |
Use JSON with POST. I have yet to use the 0.2.0, which was published last night. Do you want to make a repo with your code? Otherwise, I usually use Visual Studio Code for its great, fast debugger. Put a |
Or just wait until the docs are finished for 0.2.0 :) |
@wuyuanyi135 You aren't too far off. The API in 0.2.0 did change slightly. Instead of: .configure(authentication({
secret: '123',
loginEndpoint: '/login',
})); You need to do this: .configure(authentication({
token: {
secret: '123',
},
local: {
localEndpoint: '/login',
}
})); Now I found a bug with the localEndpoint not being overriden by the value you pass in so I'm working on that right now, but the default endpoint is now Apologies for the confusion but until we get to a 1.0.0 for feathers-authentication some stuff may be changing. Probably not much more now it's mostly just documenting and testing. |
Alright I've fixed the issue (#55) where custom local options were not being picked up. So you can do this: .configure(authentication({
token: {
secret: '123',
},
local: {
localEndpoint: '/login',
}
})); |
@wuyuanyi135 I'm going to close this now. I've tested it and your custom endpoint should work if you change up your config. I'll have new docs up soon that explain all the different config options. |
Thank you guys. I will try the latest version. Also thanks @marshallswain for your debugging tips. I will look into that |
I just followed the doc to create an authentication app
I only changed the
loginEndpoint
to where I want. The create action is done properly. However, the login requestPOST http://localhost:8080/riddle/api/user/login
with payload{"username":"yyy","password":"xxx"}
returns500: Internal Server Error
and an empty json object, no stack trace at all.There was no any output on the console. Did I miss any dependency?
The text was updated successfully, but these errors were encountered: