# Authentication not working after a recent update

**URL:** https://meta.discourse.org/t/authentication-not-working-after-a-recent-update/52064
**Category:** Support
**Created:** [10월 26, 2016, 5:48오후 UTC](https://meta.discourse.org/t/authentication-not-working-after-a-recent-update/52064 "2016-10-26T17:48:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![strycore](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/strycore/32/121461_2.png) [@strycore](https://meta.discourse.org/u/strycore)
#### Post date: [10월 26, 2016, 5:48오후 UTC](https://meta.discourse.org/t/authentication-not-working-after-a-recent-update/52064/1 "2016-10-26T17:48:29Z")

</div>

I have a Discourse instance that has been working nicely for the past few months, it’s using a standard Docker setup and is behind an Nginx reverse proxy. (hosted here: [https://forums.lutris.net/](https://forums.lutris.net/) ). The Docker container doesn’t use SSL, HTTPS is handled by the Nginx reverse proxy with a Let’sEncrypt certificate.

I have recently received complaints from users not being able to log in and after logging out from my account, I’m unable to log in as well. I’ve tried the /users/admin-login method for logging in an admin user but this isn’t working either.  
I had suspected that the problem would come from an issue with SSO login, which I have disabled for the time being and the problem persists.

Here’s what shows up in the logs when I try to log in, no errors whatsoever, the user is just being redirected to the home page without being logged in.

```
Started GET "/session/csrf?_=1477502949683" for 45.50.167.200 at 2016-10-26 17:40:03 +0000
Processing by SessionController#csrf as */*
  Parameters: {"_"=>"1477502949683"}
Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
Started POST "/session" for 45.50.167.200 at 2016-10-26 17:40:04 +0000
Processing by SessionController#create as */*
  Parameters: {"login"=>"strider", "password"=>"[FILTERED]"}
Completed 200 OK in 283ms (Views: 0.1ms | ActiveRecord: 34.7ms)
Started POST "/login" for 45.50.167.200 at 2016-10-26 17:40:04 +0000
Processing by StaticController#enter as HTML
  Parameters: {"username"=>"strider", "password"=>"[FILTERED]", "redirect"=>"https://forums.lutris.net/"}
Redirected to http://forums.lutris.net/
Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
Started GET "/" for 45.50.167.200 at 2016-10-26 17:40:05 +0000
Processing by ListController#latest as HTML
  Rendered list/list.erb within layouts/application (6.5ms)
  Rendered layouts/_head.html.erb (0.3ms)
  Rendered common/_special_font_face.html.erb (0.2ms)
  Rendered common/_discourse_stylesheet.html.erb (0.1ms)
  Rendered common/_google_universal_analytics.html.erb (0.1ms)
  Rendered application/_header.html.erb (0.1ms)
  Rendered common/_discourse_javascript.html.erb (0.2ms)
Completed 200 OK in 82ms (Views: 10.7ms | ActiveRecord: 15.4ms)

```

Again, this is a completely new issue. The Discourse instance was working flawlessly a few days ago. I’m running out of ideas of what could be causing this issue and I’m hoping someone here will know 🙂

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [10월 26, 2016, 5:52오후 UTC](https://meta.discourse.org/t/authentication-not-working-after-a-recent-update/52064/2 "2016-10-26T17:52:33Z")

</div>

This happens when the reverse proxy isn’t configured properly.

Please try to add the necessary headers:

> [@Twitter, Github and normal username and password logins not working after upgrade](https://meta.discourse.org/t/twitter-github-and-normal-username-and-password-logins-not-working-after-upgrade/51854/30):
>
> I’m not seeing proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for; proxy\_set\_header X-Forwarded-Proto https; in that How To can you try it?

---

<div class="post-metadata">

### Author: ![strycore](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/strycore/32/121461_2.png) [@strycore](https://meta.discourse.org/u/strycore)
#### Post date: [10월 26, 2016, 5:56오후 UTC](https://meta.discourse.org/t/authentication-not-working-after-a-recent-update/52064/3 "2016-10-26T17:56:10Z")

</div>

I was indeed missing the line

```
proxy_set_header X-Forwarded-Proto https;

```

It’s now working again, thanks a lot!!

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [10월 26, 2016, 5:56오후 UTC](https://meta.discourse.org/t/authentication-not-working-after-a-recent-update/52064/4 "2016-10-26T17:56:30Z")

</div>


