# Twitter, Github and normal username and password logins not working after upgrade

**URL:** <https://meta.discourse.org/t/twitter-github-and-normal-username-and-password-logins-not-working-after-upgrade/51854>\
**Category:** Self-hosting\
**Tags:** unsupported-install\
**Created:** [2016 年10 月 21 日 12:58 UTC](https://meta.discourse.org/t/twitter-github-and-normal-username-and-password-logins-not-working-after-upgrade/51854 "2016-10-21T12:58:57Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

作者： ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
发布日期： [2016 年10 月 21 日 18:32 UTC](https://meta.discourse.org/t/twitter-github-and-normal-username-and-password-logins-not-working-after-upgrade/51854/24 "2016-10-21T18:32:51Z")

</div>

I’m having the same issue, affecting both SSO and `/users/admin-login` logins.

I’m not sure what’s happening here. This is how things go:

- I hit `/` via HTTPS without any cookies.
- I am given a cookie like this: `_forum_session=bVd; path=/; HttpOnly`, and redirected to `/session/sso`. Makes sense!
- I hit `/session/sso` via HTTPS, sending `Cookie: _forum_session=bVd`. Discourse responds with a redirect to my SSO URL, and sets a new cookie: `_forum_session=VXd; path=/; HttpOnly`. Why do I get a new cookie?
- After a little dance with the SSO source, I hit `/session/sso_login?sso=xxxxxx` via HTTPS, sending `Cookie: _forum_session=VXd` with the request. Discourse redirects to `/`, sending a third cookie: `Set-Cookie: _forum_session=QzB; path=/; HttpOnly`
- I hit `/` via HTTPS, the cookie is sent: `Cookie: _forum_session=QzB`. However, this is treated like an unauthenticated request, I’m issued a new cookie and sent to `/session/sso` again.

Disabling `force_ssl` fixes this. Note that all requests are made over HTTPS. Also note that the cookies aren’t actually marked as secure.

My install is also behind an nginx proxy.

---

_[View the full topic](https://meta.discourse.org/t/twitter-github-and-normal-username-and-password-logins-not-working-after-upgrade/51854)._
