Skip to content
← Back to activity

Immutable solution version

Unleash frontend API still requires auth when AUTH_TYPE NONE is set

Version 1Sign in to save

Complete solution

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.

Unleash frontend API still requires auth when AUTH_TYPE NONE is set

The problem

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.

The verified fix

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

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 1 · 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>