hi, can you pleae check following description of i...
# ask-a-descoper
a
hi, can you pleae check following description of issue we are facing on frontend and help how we can solve this.
Copy code
Intermittent 404 on flow config/theme after logout → login (BYOS flow, Angular SDK)

Product integration

Descope Angular SDK (@descope/angular-sdk) with Bring Your Own Screen (BYOS) flow.
Flow ID: byos-flow-copy.
Project ID: P2uxgoL1Y0TWOdcHMn97uSLjRFYW.
Our app runs in the browser (e.g. localhost:4200 or localhost:4700) and uses your hosted APIs/CDN for flow config and theme.
Issue in one sentence
After a user logs in, logs out, and is redirected back to the login page, the login screen sometimes stays on "Loading secure login..." because requests for config.json and theme.json return 404 (NoSuchKey) from your infrastructure; when those same resources return 200/304, the flow initializes and login works.

When it happens:

Sequence: User is logged in → user logs out (we call your APIs and clear local/session storage) → user is sent to our login route (or IdP redirect lands them on /auth/login with OIDC params).
Result when the bug occurs: The page shows "Loading secure login..." and never shows the login form.
Frequency: Intermittent ("comes and goes"). We only see it in this post-logout → back-to-login path; a fresh load or different navigation can work.
What we see in the browser (Network tab)

When it fails (stuck UI):

config.json and/or theme.json return 404 Not Found.
Response body is an S3-style error, e.g.:
Code: NoSuchKey
Message: The specified key does not exist.
Key (examples we've seen):
pages/v2-beta/config.json
pages/v2-beta/theme.json
pages/P2uxgoL1Y0TWOdcHMn97uSLjRFYW/v2-alpha/config.json
So when the bug occurs, the flow runtime is requesting these keys from your storage/CDN and they are missing (or the path/version is wrong).

When it works (login loads correctly):

config.json:
URL: <https://api.descope.com/pages/P2uxgoL1Y0TWOdcHMn97uSLjRFYW/v2-beta/config.json>
Status: 200 OK
theme.json:
URL: <https://static.descope.com/pages/P2uxgoL1Y0TWOdcHMn97uSLjRFYW/v2-beta/theme.json>
Status: 304 Not Modified (cached)
After that, POST <https://api.descope.com/v1/flow/start> returns 200 OK and the flow initializes; the login form appears and the user can sign in.
Conclusion we need your help to confirm

When the flow works, we see requests to v2-beta with the project ID in the path (/pages/{projectId}/v2-beta/config.json and theme.json).
When it fails, we see 404 for similar resources, sometimes with v2-alpha or with a path that appears to omit the project ID (e.g. pages/v2-beta/config.json).
So we suspect the issue is one or more of:

The runtime sometimes requesting v2-alpha (or another version) where those keys are not present for our project.
The runtime sometimes requesting config/theme without the project ID in the path, leading to NoSuchKey.
Caching or redirect behavior differing after logout (e.g. different first-request path or version), which would explain intermittency.
We are not serving config.json or theme.json ourselves; all these requests go to your hosts (e.g. <http://api.descope.com|api.descope.com>, <http://static.descope.com|static.descope.com>).

What we're asking

Can you confirm why config.json and theme.json would return 404 NoSuchKey for our project in the paths above (especially for v2-alpha or for paths without project ID)?
Is there a known issue or recommended configuration (e.g. flow version, publish state, or SDK config) so that only v2-beta with project ID is used and these 404s stop?
Any recommended workarounds (e.g. SDK options, flow publishing steps, or cache headers) while this is investigated?\

Descope Angular SDK (BYOS flow).
Flow ID: byos-flow-copy.
Project ID: P2uxgoL1Y0TWOdcHMn97uSLjRFYW.
Reproduced in Chrome (including Incognito), after logout then redirect to login; no custom proxy or unusual network setup.
attached screenshot below
✅ 1
d
Flow Configuration Issue Analysis Based on your description, this appears to be a flow versioning and publishing issue where the runtime is requesting different versions (v2-alpha vs v2-beta) or incorrect paths for your BYOS flow configuration files. Root Cause The 404 errors for
config.json
and
theme.json
suggest your flow may not be properly published or there's a version mismatch between what the runtime expects and what's available. Immediate Steps to Resolve 1. Verify Flow Status - Go to your Descope Console → Flows - Check if
byos-flow-copy
is enabled/active - If disabled, click the three dots → Activate 2. Re-publish Your Flow - Open your BYOS flow in the editor - Make a minor change (add a space, then remove it) - Save the flow to trigger a new publish
Copy code
# Check flow status via API
curl -X POST "<https://api.descope.com/v1/mgmt/flow/list>"  
  -H "Authorization: Bearer P2uxgoL1Y0TWOdcHMn97uSLjRFYW:<your-management-key>"  
  -H "Content-Type: application/json"  
  -d '{"ids": ["byos-flow-copy"]}'
SDK Configuration Fix Ensure your Angular SDK is configured to use the correct flow version:
Copy code
// In your component
import { DescopeService } from '@descope/angular-sdk';
// Force flow refresh after logout
logout() {
  this.descopeService.logout();
  // Clear any cached flow data
  sessionStorage.removeItem('descope-flow-cache');
  localStorage.removeItem('descope-flow-cache');
}
• Flow versioning issues can cause intermittent 404s when the runtime requests outdated versions • Flows can be disabled/enabled from the console which affects availability • BYOS flows maintain backend logic while allowing custom UI control Flow Versioning | Descope Documentation Managing Descope Flows | Descope Documentation Bring Your Own Screen | Descope Documentation