InvalidAuthenticityToken Can't verify CSRF with rails 7.1.2. #8189
Unanswered
rajanverma-me
asked this question in
Help
Replies: 2 comments
-
Facing same issue with rails 6.1 and active admin 2.14.0. Login on development environment is working fine but on heroku its giving "Can't verify CSRF token authenticity". Any help would highly be appreciated. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ref: #3660 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a very basic Rails 7.1.2 fresh installed app. I added active admin but as usual, it all worked fine in development.
The problem happened when I pushed the app to production.
Expected behavior
The normal login should work.
Actual behavior
The admin login gives me the below error. I tried adding
skip_before_action :verify_authenticity_token
but then it won't give any error and simply redirects to the login page again. I have checked several times the password is correct.I tried downgrading 3.1 but the error is still the same. I can't downgrade it further because of rail dependency.
I've checked the authenticity token is getting passed in login requests so generation is also not the problem.
How to reproduce
Just a very straightforward setup with no additions. The only thing I have done differently is I have initially installed active admin with
--skip users
option and then again installed it with devise users. But I don't think that would be the issue.Beta Was this translation helpful? Give feedback.
All reactions