Skip to content

fix(idp): serve the real identifier app for welcome/goodbye/consent/chooseaccount#3174

Open
kost wants to merge 1 commit into
opencloud-eu:mainfrom
kost:fix-idp-static-routes-empty-response
Open

fix(idp): serve the real identifier app for welcome/goodbye/consent/chooseaccount#3174
kost wants to merge 1 commit into
opencloud-eu:mainfrom
kost:fix-idp-static-routes-empty-response

Conversation

@kost

@kost kost commented Jul 25, 2026

Copy link
Copy Markdown

fix(idp): serve the real identifier app for welcome/goodbye/consent/chooseaccount

The vendored lico library registers /welcome, /goodbye, /consent, and /chooseaccount (alongside /identifier) as routes served by its own built-in identifier webapp
(vendor/github.com/libregraph/lico/identifier/identifier.go). That built-in webapp's index.html is only ever read from disk when IdentifierClientDisabled is false - but OpenCloud always runs with it true, since services/idp/pkg/service/v0/service.go's Index() serves our own, correctly-templated identifier app instead. Previously only /signin/v1/identifier (and its trailing-slash/index.html variants) was overridden this way; hitting any of the other four directly - a bookmarked URL, or a SAML logout redirect via
absoluteURLForRoute("goodbye") - reached lico's handler instead, which writes a permanently-empty webappIndexHTML: HTTP 200 with a literally empty body, and nothing rendered.

All five are routes the identifier app's own client-side router (services/idp/src/Routes.jsx) already recognizes, so serving our real index.html for all of them is enough to fix this.

Types of changes

  • [ X ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

…hooseaccount

The vendored lico library registers /welcome, /goodbye, /consent, and
/chooseaccount (alongside /identifier) as routes served by its own
built-in identifier webapp
(vendor/github.com/libregraph/lico/identifier/identifier.go). That
built-in webapp's index.html is only ever read from disk when
IdentifierClientDisabled is false -- but OpenCloud always runs with it
true, since services/idp/pkg/service/v0/service.go's Index() serves
our own, correctly-templated identifier app instead. Previously only
/signin/v1/identifier (and its trailing-slash/index.html variants) was
overridden this way; hitting any of the other four directly -- a
bookmarked URL, or a SAML logout redirect via
absoluteURLForRoute("goodbye") -- reached lico's handler instead,
which writes a permanently-empty webappIndexHTML: HTTP 200 with a
literally empty body, and nothing rendered.

All five are routes the identifier app's own client-side router
(services/idp/src/Routes.jsx) already recognizes, so serving our real
index.html for all of them is enough to fix this.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant