I’ve written a custom web page extension in React for an in-house tracking tool that uses the SonarQube web API. All the GET requests work fine since they don’t seem to require any authentication, but my one POST request only works when not logged into any user.
The POST request is to bulk change some issues by adding and removing tags. If logged into any account, even one different from the owner of the auth token, it begins returning a 401. Logging out “fixes” the issue.
fetch(url, {
method: “POST”,
headers: new Headers({
“Authorization”:Basic ${AUTH_TOKEN}
})
})
How would I go about resolving this or should I be authenticating using the currently logged in user (if that is possible)? Any help would be greatly appreciated.