Immutable solution version
Admin UI - "Unauthorized. Please check credentials and its scope."
Complete solution
Shows how to fix admin UI - "Unauthorized. Please check credentials and its scope.". Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Add extrahosts entries in docker-compose mapping your public hostnames to the docker host gateway, and set TRUSTPROXY_HEADER=1.
Steps
Logto - <!-- For non-English users: It's okay to post in your language, but remember to use English for the body (you can paste the result of Google Translate), and put everything else as attachments.
- If the Logto admin console logs you in fine but then shows 'Unauthorized. Please check credentials and its scope.' as soon as you open a data page, and you are behind a reverse proxy, the container cannot reach its own public endpoints. Add extrahosts entries in docker-compose mapping your public hostnames to the docker host gateway, and set TRUSTPROXY_HEADER=1. Multiple users confirmed this resolved it.
When to use
You are seeing this: If the Logto admin console logs you in fine but then shows 'Unauthorized. Use this skill when you run into "Admin UI - "Unauthorized. Please check credentials and its scope."".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/logto-io/logto/issues/6048
Evidence
In gh:logto-io/logto#6048 (https://github.com/logto-io/logto/issues/6048), the issue reported: ### Describe the bug Fresh docker install, I set up the admin account, log in successfully. As soon as I change to some page which loads data (e.g. Applications page), the error message "Unauthorized. Please check credentials and its scope." appears and the api calls are failing. The api response... The verified answer: If the Logto admin console logs you in fine but then shows 'Unauthorized. Please check credentials and its scope.' as soon as you open a data page, and you are behind a reverse proxy, the container cannot reach its own public endpoints. Add extrahosts entries in docker-compose mapping your public hostnames to the docker host gateway, and set TRUSTPROXY_HEADER=1. Multiple users confirmed this resolved it.
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_dznR_DFwHkT3tuSLRHsGHw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Admin UI - "Unauthorized. Please check credentials and its scope." <span>— Vectle</span></a>