question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hey!

I’m unable to login (most of the times) and when I do I cannot edit/create any models as I constantly get thrown off by: keystone.security.csrf.validate. Logs give me no clues on how to proceed and I’m unsure on how to debug this. I’m running the latest version of keystone.

Errors: There was an error with your request, please try again. and There was a problem with your request, please try again.

Any ideas on how to debug or proceed with this is much appreciated.

Thanks, Isak

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
itzakscommented, Sep 23, 2014

@grabbou Ok cool!

@JedWatson Ah… I see, thanks for the quick answer. I’m running with two dynos and the MongoHQ 1 GB SSD addon. So I basically should configure the session handler to use mongo, right? Are there any instructions available on how to do so?

EDIT: Ah, http://keystonejs.com/docs/configuration/ of course 😄 I’ll configure as stated and get back with a report!

1reaction
JedWatsoncommented, Sep 23, 2014

@itzaks are you running your Heroku app with more than one dyno? If so, you also need to use a database for maintaining session state, as the in-memory datastore would fail if you generated a csrf token on one dyno, then made the next request to a different dyno.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSRF Protection Problem and How to Fix it - freeCodeCamp
CSRF is an acronym for Cross-Site Request Forgery. It is a vector of attack that attackers commonly use to get into your system....
Read more >
CSRF Error Explained. - Yabdab Inc. Support - Zendesk
CSRF, or Cross-Site Request Forgery, is a vulnerability very common in websites. In short, it means that if you have your site at...
Read more >
What is CSRF Token Error? | Knowledge Base | Keen
I logged into Keen but all I see is a token error, what's happened?
Read more >
How to fix the “CSRF token mismatch error” message
The “Invalid or missing CSRF token” message means that your browser couldn't create a secure cookie or couldn't access that cookie to authorize...
Read more >
CSRF Failed: CSRF token missing or incorrect - Stack Overflow
When you are using SessionAuthentication, you are using Django's authentication which usually requires CSRF to be checked. Django REST Framework enforces ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found