Forem Creators and Builders

loading...

I keep getting "Can't verify CSRF token authenticity." when login in locally

Anthony Francis
・1 min read

I've successfully deployed forem in production. However, very recently when I try to login locally with Default Admin User or any user. I keep getting "Can't verify CSRF token authenticity." in my terminal, which in the browser the session goes to a blank white screen.

Alt Text

Does anyone know why this is happening?

Forem was working before locally and I'm not having this issue in production.

Discussion (3)

Collapse
rhymes profile image
rhymes

Hi @anthonyfrancis can you give some more information?

How is the local copy setup? Have you tried with email/password or also with social auths? Have you tried resetting the SECRET_KEY_BASE environment variable with a new value?

Collapse
anthonyfrancis profile image
Anthony Francis Author

I managed to fix the issue. I cloned the main Forem from github and got it working from it's original state locally, then pushed the main forem to my github fork and heroku application. It was the quickest work around I can think off.

Thank you for the response.

Collapse
ellativity profile image
Ella Ang (she/her/elle)

Nice one! 🙌

Thanks for letting us know that you're all set, and please continue to reach out to us here with any further questions you encounter.