You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@danrademacher I can not login as well, some weird error about Can't verify CSRF token authenticity., we need to check a bit more.
Warning! ActionDispatch::Session::MemCacheStore failed to save session. Content dropped.
I, [2022-10-18T19:05:27.704962 #487] INFO -- : [e61ad535-bf28-424f-abd9-c36a42e57838] Started POST "/login" for 192.168.144.1 at 2022-10-18 19:05:27 +0000
I, [2022-10-18T19:05:27.712393 #487] INFO -- : [e61ad535-bf28-424f-abd9-c36a42e57838] Processing by SessionsController#create as HTML
I, [2022-10-18T19:05:27.719100 #487] INFO -- : [e61ad535-bf28-424f-abd9-c36a42e57838] Parameters: {"utf8"=>"✓", "authenticity_token"=>"SlR7RcQYQAQUGQnOA75TLl--9dHLNbUZyIKK9JwyAVyCGUx1VJmhBZ7LYrcQ9WOsauSMdvjVSD6iJ9I6xfODhQ", "referer"=>"/#map=5/51.468/-0.110&layers=O", "username"=>"Rub21", "password"=>"[FILTERED]", "remember_me"=>"0", "commit"=>"Login"}
W, [2022-10-18T19:05:27.732533 #487] WARN -- : [e61ad535-bf28-424f-abd9-c36a42e57838] Can't verify CSRF token authenticity.
I, [2022-10-18T19:05:31.383859 #487] INFO -- : [e61ad535-bf28-424f-abd9-c36a42e57838] Redirected to http://0.0.0.0/#map=5/51.468/-0.110&layers=O
I, [2022-10-18T19:05:31.391012 #487] INFO -- : [e61ad535-bf28-424f-abd9-c36a42e57838] Completed 302 Found in 3660ms (ActiveRecord: 2266.1ms | Allocations: 20292)
@Rub21 and @batpad did you two find a time to look at this issue yet? We're a bit blocked on local testing of certain things, like iD, until we can again log in locally.
@danrademacher we did spend some time looking, unfortunately no cheese :(
Do we know if this ever worked? Afaik, when we were testing login issues locally previously, it was with a local database. As I understand, this continues to work - the login only fails when attempting to use the staging database via port forwarding. Would just be useful if we had an idea if this is a recent regression / ever worked, etc.
We did see some errors to do with memcache in the logs, and so spent some time trying to mess with the memcache settings, including trying to forward the staging memcached locally and use that.
Since it works with a local database, this is definitely something to do with using the staging database, and that causing something to fail the verification of the CSRF / authenticity token sent with form submissions. We had a strong hunch that also using the staging memcache would fix this, but unfortunately the same error seems to persist.
Am a bit unsure what to try next - might need to do some reading on Rails and how it signs and verifies CSRF tokens.
Yes, this did work in the past — I’m not sure when it stopped, but certainly it worked when we were modifying iD in the past for date filters. I logged in with local testing to staging many times for that — I’ve never set up a local database at all
Activity
Rub21 commentedon Oct 18, 2022
@danrademacher I can not login as well, some weird error about
Can't verify CSRF token authenticity., we need to check a bit more.Also I have made some updates ini the way to access to the development mode OpenHistoricalMap/ohm-deploy#189
cc. @batpad
danrademacher commentedon Nov 7, 2022
@Rub21 and @batpad did you two find a time to look at this issue yet? We're a bit blocked on local testing of certain things, like iD, until we can again log in locally.
batpad commentedon Nov 8, 2022
@danrademacher we did spend some time looking, unfortunately no cheese :(
Do we know if this ever worked? Afaik, when we were testing login issues locally previously, it was with a local database. As I understand, this continues to work - the login only fails when attempting to use the staging database via port forwarding. Would just be useful if we had an idea if this is a recent regression / ever worked, etc.
We did see some errors to do with
memcachein the logs, and so spent some time trying to mess with thememcachesettings, including trying to forward the stagingmemcachedlocally and use that.Since it works with a local database, this is definitely something to do with using the staging database, and that causing something to fail the verification of the CSRF / authenticity token sent with form submissions. We had a strong hunch that also using the staging
memcachewould fix this, but unfortunately the same error seems to persist.Am a bit unsure what to try next - might need to do some reading on Rails and how it signs and verifies CSRF tokens.
cc @Rub21
danrademacher commentedon Nov 8, 2022
Yes, this did work in the past — I’m not sure when it stopped, but certainly it worked when we were modifying iD in the past for date filters. I logged in with local testing to staging many times for that — I’ve never set up a local database at all
Rub21 commentedon Nov 8, 2022
@batpad @danrademacher ,I have been looking a bit more at this issue, for some reason it does not work with the staging-db.
So. I have tried with the local DB and I have created a user and login, it went ok, but it still needs some auth token configuration.
I have tried to create the auth OAuth 2 applications, but it requires that URL should be https, in our local environment we can not set Https URL, it may need some extra configuration.
danrademacher commentedon Nov 8, 2022
I see. So this probably stopped working in the summer when we updated OSM upstream, when OAUTH2 came online for us, right?
If so, then this wouldn't be unique to us. I wonder if folks in OSM dev community have methods for dealing with this.
1ec5 commentedon Nov 8, 2022
I’ve never gotten OAuth to work in JOSM either for the OHM server, so I just assumed it was the same issue with iD. 🤔
Rub21 commentedon Nov 9, 2022
Here the PR that contains the documentation to setup a Dev environment: OpenHistoricalMap/ohm-deploy#189, Confirmed by @danrademacher
danrademacher commentedon Dec 28, 2022
Resolved with new localdev using only ohm-website