# Login - Can't verify CSRF token authenticity

**URL:** https://meta.discourse.org/t/login-cant-verify-csrf-token-authenticity/41181
**Category:** Development
**Created:** [March 17, 2016, 9:07am UTC](https://meta.discourse.org/t/login-cant-verify-csrf-token-authenticity/41181 "2016-03-17T09:07:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Steve\_Ng](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@Steve\_Ng](https://meta.discourse.org/u/Steve_Ng)
#### Post date: [March 17, 2016, 9:07am UTC](https://meta.discourse.org/t/login-cant-verify-csrf-token-authenticity/41181/1 "2016-03-17T09:07:40Z")

</div>

Hi, when I am logging in, sometimes I get this error. It would result in me unable to login at all. Any idea how does this error come from?

This result in the inability to even login to discourse.

```
I, [2016-03-17T17:05:20.078871 #4141] INFO -- : Started POST "/session" for 127.0.0.1 at 2016-03-17 17:05:20 +0800
I, [2016-03-17T17:05:20.134365 #4141] INFO -- : Processing by SessionController#create as */*
I, [2016-03-17T17:05:20.136184 #4141] INFO -- : Parameters: {"login"=>"xx@gmail.com", "password"=>"[FILTERED]"}
W, [2016-03-17T17:05:20.137855 #4141] WARN -- : Can't verify CSRF token authenticity
I, [2016-03-17T17:05:20.139322 #4141] INFO -- : Rendered text template (0.0ms)
I, [2016-03-17T17:05:20.140774 #4141] INFO -- : Filter chain halted as :verify_authenticity_token rendered or redirected
I, [2016-03-17T17:05:20.142685 #4141] INFO -- : Completed 403 Forbidden in 5ms (Views: 1.6ms | ActiveRecord: 0.0ms)

```

---

<div class="post-metadata">

### Author: ![Steve\_Ng](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@Steve\_Ng](https://meta.discourse.org/u/Steve_Ng)
#### Post date: [March 18, 2016, 1:32am UTC](https://meta.discourse.org/t/login-cant-verify-csrf-token-authenticity/41181/2 "2016-03-18T01:32:44Z")

</div>

For the reference of the other folks who might have this problem:

I have initially set config.assets.prefix = ‘/’

Changing the asset directory to anything but / would solve this.
