Replies: 1 comment 4 replies
-
I believe the issue is that you're loading both the |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a small project using Rodauth within a Sinatra application and I'm seeing something really strange. Locally (using Puma) the account creation and login flow works fine but in production (a small server running nginx + Puma) any Rodauth-related actions fail because of a CSRF Token mismatch.
I've tried almost every combination of
use_request_specific_csrf_tokens
/require_request_specific_tokens
andcsrf_tag
, with and without method and path.The error I get every time is:
Roda::RodaPlugins::RouteCsrf::InvalidToken: decoded token is not valid for request method and path
Current setup looks like this:
The code to generate tokens to be compared is in the
route_csrf
plugin:Since I can't get the csrf_secret from the session I can't back-engineer this and try to figure out which part of the data is different between the two tokens being compared.
Are there any thoughts about how to debug this? Perhaps something I missed in the docs or something else to try besides changing the requirement for path/method?
Beta Was this translation helpful? Give feedback.
All reactions