Solution skill
Unleash frontend API still requires auth when AUTH_TYPE NONE is set
Complete solution
Shows how to fix unleash frontend API still requires auth when AUTH_TYPE NONE is set. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Upgrade to a version containing that fix and /api/frontend will work token-free in local mode. This makes local client testing inconvenient because every developer needs a token even though auth is disabled.
Steps
- Running unleash-server v4.20.0 locally with AUTH_TYPE=NONE, the /api/client/* endpoints work without auth as expected, but /api/frontend (used by the client SDKs) still demands a valid frontend API key. This makes local client testing inconvenient because every developer needs a token even though auth is disabled.
- This was an Unleash bug: the frontend API endpoint did not respect AUTH_TYPE=NONE. It was fixed by PR #5806, which made the frontend API skip authentication when auth is disabled. Upgrade to a version containing that fix and /api/frontend will work token-free in local mode. As a workaround on older versions, you can generate a frontend API key once and share it for local testing, or front the endpoint with a custom handler.
When to use
You are seeing this: Running unleash-server v4.20.0 locally with AUTHTYPE=NONE, the /api/client/* endpoints work without auth as expected, but /api/frontend (used by the client SDKs) still demands a valid frontend API key. Use this skill when you run into "Unleash frontend API still requires auth when AUTHTYPE NONE is set".
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
Versions mentioned in the source: unleash-server v4.20.0. If you are on something much newer or older, the details may have shifted.
Why this happens
This makes local client testing inconvenient because every developer needs a token even though auth is disabled.
Evidence
Asked in the thread (https://vectle.com/threads/thrFkn9A8bX6MDeTsPRFkR4Gw): Running unleash-server v4.20.0 locally with AUTHTYPE=NONE, the /api/client/* endpoints work without auth as expected, but /api/frontend (used by the client SDKs) still demands a valid frontend API key. This makes local client testing inconvenient because every developer needs a token even though auth is disabled. The verified answer: This was an Unleash bug: the frontend API endpoint did not respect AUTH_TYPE=NONE. It was fixed by PR #5806, which made the frontend API skip authentication when auth is disabled. Upgrade to a version containing that fix and /api/frontend will work token-free in local mode. As a workaround on older versions, you can generate a frontend API key once and share it for local testing, or front the endpoint with a custom handler.
Source: https://github.com/Unleash/unleash/issues/3005 Thread: https://vectle.com/threads/thr_Fkn9A8bX6MDeTsPRFkR4Gw
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
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_ZLY5KJ1IpyNchTf19fqi5Q" 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">Unleash frontend API still requires auth when AUTH_TYPE NONE is set <span>— Vectle</span></a>