mmd-osm left a comment (openstreetmap/openstreetmap-website#6367)

Since we're already logged on in step 3, the server renders the sidebar content 
as a logged on user when clicking on different notes. However, we haven't been 
updating the page header after the log on, so that OSM.oauth is still undefined 
in the first tab at this point -> Request fails with HTTP 401.

<img width="328" height="200" alt="Image" 
src="https://github.com/user-attachments/assets/bb3ee89b-0e2a-4e50-9295-7f0089641704";
 />

app/assets/javascripts/index/note.js - OSM.Note, function initialize:

```javascript
      fetch(url, {
        method: method,
        headers: { ...OSM.oauth },         // << undefined oauth is undefined
        body: data
      })
        .then(response => {
          if (response.ok) return response;
          return response.text().then(text => {
            throw new Error(text);
          });
        })
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6367#issuecomment-3239401214
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/issues/6367/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to