rust-lang / crates.io

The Rust package registry
https://crates.io
Apache License 2.0
2.98k stars 601 forks source link

Login broken in staging enviroment (master) #1298

Closed jtgeibel closed 6 years ago

jtgeibel commented 6 years ago

I believe some recent changes to the frontend have broken the session handling. I'm no longer able to log into my staging environment.

I've confirmed that I have no issue in the current production deployment.

It looks like this was introduced in 280a24365ca653419b6042c4437b50c2e2380a16. On this commit the page loads but does not detect that I am logged in. Checking out 280a243^ and the app refreshes and shows that I am logged in.

cc @Turbo87 @CvX cc @carols10cents - fyi to avoid pushing a deployment for now

jtgeibel commented 6 years ago

A bit more info, I can still access the /me route and see that I am logged in. I can even successfully create a new token from this page. The only issue is that the top right of the page still shows the "Login with GitHub" link.

I'm not sure if this is the proper solution, but things seem to work fine locally if I add a session: service(), line to app/controllers/application.js

Turbo87 commented 6 years ago

@jtgeibel ouch, thanks for letting us know. sounds like we forgot to add the injection for one of the templates. can you open a PR with your fix?

It's unfortunate that we can't test the auth stuff properly without running the backend locally :disappointed:

jtgeibel commented 6 years ago

Alright, I've pushed the change. Maybe we add a test that logs a user in and leverages the new percy integration to detect visual changes.