Reputation: 2081
I am creating simple application in scala and play framework, when I use post request it is not working and it gives me "Unauthorized" , you must be authenticated to access this page,
Though I am not using any authentication yet why I am getting this error ?
on Get I am seeing login page, but after filling up form and then using post I am not able to redirect to home page
Upvotes: 0
Views: 1657
Reputation: 755
As I stated in comment author is probably missing CSRF token: https://www.playframework.com/documentation/2.6.x/ScalaCsrf, I linked docs for play 2.6 because they tell more about usage of CSRF headers in views (which should also work in previous versions).
It may also be possible that application is accessed at wrong address, check out the following: https://www.playframework.com/documentation/2.5.x/AllowedHostsFilter.
Upvotes: 1