Log in button does not redirect due to cache issues (?)


(Marcin Ossowski von Wendorff) #1

Hello.
I have set up SSO with my application and it works. Most of the time: after first time, clicking log in no longer redirects me to my app’s sso provider. Nothing happens. In the browser console, I can see:

GET http://d.lvh.me:3000/session/sso [HTTP/1.1 302 Moved Temporarily 117ms]

and the 302 response is returning correct Location pointing to my sso with correct signature and payload.
(d.lvh.me points to 127.0.0.1 where i run discourse)

The problem is, nothing happens. My sso provider is not called. I added no-store, no-cache to SessionController#sso, as well as to my provider, but this does not solve the problem. Maybe Discoure’s javascript is stopping this ? How can I debug that? After fighting 4 hours with this, I’m out of ideas :frowning:


(Kane York) #2

What does the browser’s Network tab show the chain of requests as? In chrome, click “Preserve log”.


(Marcin Ossowski von Wendorff) #3

Sure:
When I click on login, the only request is:
GET sso?return_path=/ which returns 302 with Location: lvh.me:3000/discoure/sso?sso=(....) which is sso provider.
The sso provider server never gets any request.
network console screenshot here:
https://i.imgur.com/1gmUvhC.png

Thank You for help!