4

I am getting the following error when a request is send to the server. What does this message mean and how could I solve this.

p.a.m.DefaultUrlEncodedCookieDataCodec - Cookie failed message authentication check

I am trying to integrate Silhouette in my application. I am using cookie based authentication. I suppose the warning is related to it but I am not sure what it means and how to solve it.

Manu Chadha
  • 15,555
  • 19
  • 91
  • 184

1 Answers1

0

You have to clear out the PLAY_SESSION cookie from the previous version of Play framework you were running. If you are using Chrome, go to Settings. Scroll down and click on Show Advanced Settings. Privacy -> Content Settings -> All cookies and site data. Here you have an option of clearing out all cookies or filtering by host (likely localhost if you are on your development machine) and deleting only the PLAY_SESSION cookie.

If done correctly, this warning will immediately stop showing up when you make a request to your server.

gogogadgetgeek
  • 327
  • 1
  • 2
  • 10
  • In the same browser I'm accessing two servers running Play 2.5 and Play 2.6, is that the reason I'm getting in Play 2.6 `DefaultUrlEncodedCookieDataCodec` ? – ps0604 Aug 10 '18 at 22:05
  • If the host names are the same for each server, this warning/error message could occur. – gogogadgetgeek Aug 13 '18 at 15:29
  • in both cases the host name is `localhost` – ps0604 Aug 13 '18 at 16:00
  • You will continue to see this warning as long as you run two different versions of Play on localhost in the same web browser. I would verify that removing the cookie makes the warning go away for Play 2.6. Then I would not worry about the warning popping up anymore if I were you. Or if seeing the warning continues to bother you, you can run the apps in two different web browsers. – gogogadgetgeek Aug 14 '18 at 19:32