Forem Creators and Builders 🌱

Anthony Francis
Anthony Francis

Posted on

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

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.

Oldest comments (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

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 (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.