Authentication provider is broken in Canvas OAuth
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3546746. -->
Reported by: [mayur-sose](https://www.drupal.org/user/3832406)
Related to !103
>>>
<h3 id="overview">Overview</h3>
<p>
Encountered a <strong>403 error</strong> when attempting to upload or download a code component using the CLI, despite having added all the required keys and permissions. The error message states:<br>
<em>"The used authentication method is not allowed on this route."</em>
</p>
<p>
<strong>Upload Command:</strong> <code>node dist/index.js upload -d ~/cliTest/component</code>
</p>
<p>
<strong>Upload API Error Details:</strong></p>
<ul>
<li>Status: 403</li>
<li>URL: <code>/canvas/api/v0/config/js_component</code></li>
<li>Method: POST</li>
<li>Response data:<br>
<pre>{
"errors": [
"The used authentication method is not allowed on this route."
]
}
</pre></li>
<li>Request headers:<br>
<pre>{
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json",
"Authorization": "Bearer ********",
"X-Canvas-CLI": "1",
"User-Agent": "axios/1.10.0",
"Content-Length": "3232",
"Accept-Encoding": "gzip, compress, deflate, br"
}</pre></li>
</ul>
<p>
The upload process fails with:</p>
<pre>
Component │ Status │ Details
test_comp1 │ Failed │ You do not have permission to perform this action. Check your configured scope.
SUMMARY │ 0 succeeded, 1 failed
</pre>
<p>
<strong>The same issue occurs when attempting to download:</strong><br>
<code>node dist/index.js download -d ~/cliTest/compo</code>
</p>
<p>
<strong>Download API Error Details:</strong></p>
<ul>
<li>Status: 403</li>
<li>URL: <code>/canvas/api/v0/config/js_component</code></li>
<li>Method: GET</li>
<li>Response data:<br>
<pre>{
"errors": [
"The used authentication method is not allowed on this route."
]
}
</pre></li>
<li>Request headers:<br>
<pre>
{
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json",
"Authorization": "Bearer ********",
"X-Canvas-CLI": "1",
"User-Agent": "axios/1.10.0",
"Accept-Encoding": "gzip, compress, deflate, br"
}
</pre></li>
</ul>
<p>
The process is canceled with the error:<br><br>
<em>You do not have permission to perform this action. Check your configured scope.</em>
</p>
<h3 id="proposed-resolution">Proposed resolution</h3>
<h3 id="ui-changes">User interface changes</h3>
> Related issue: [Issue #3525572](https://www.drupal.org/node/3525572)
issue