You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Header Login and Register buttons ignore the login and register route roles #305
The shell header's Login and Register buttons link straight to LMS URLs taken from site config, ignoring the org.openedx.frontend.role.login and org.openedx.frontend.role.register route roles. When @openedx/frontend-app-authn is installed as an app, clicking Login in the header still sends the user off to the legacy LMS login page instead of navigating to the Authn app's /authn/login route.
LoginButton renders href={config.loginUrl} in shell/header/anonymous-menu/LoginButton.tsx, and RegisterButton builds ${config.lmsBaseUrl}/register in shell/header/anonymous-menu/RegisterButton.tsx. Neither consults the routes registered by the apps in the site config.
This is inconsistent with the rest of the runtime. runtime/routing/authenticatedLoader.ts resolves the login destination with getUrlByRouteRole() first and only falls back to config.loginUrl when no app provides that role, which is why a redirect from a protected route correctly lands on the Authn app while the header button does not.
An LMS-side redirect can mask the problem, since /login redirects to AUTHN_MICROFRONTEND_URL when ENABLE_AUTHN_MICROFRONTEND is enabled. That is still a full page round trip out to the LMS and back rather than an in-app navigation, and it fails outright on deployments where the redirect is not configured.
Proposed solution
Make both buttons role-aware, preserving the current site config values as fallbacks so behavior is unchanged for sites that do not install the Authn app. LoginButton should use getUrlByRouteRole('org.openedx.frontend.role.login') and fall back to config.loginUrl; RegisterButton should use getUrlByRouteRole('org.openedx.frontend.role.register') and fall back to ${config.lmsBaseUrl}/register.
Because a resolved role URL can be either an internal path or an external route URL, the buttons should also navigate internally when the resolved value is a relative path, so that the SPA handles it rather than triggering a full page load. The same treatment likely applies anywhere else in the shell that links to authentication destinations.
Activity
fix: resolve header auth links from route roles
openedx-semantic-release-bot commentedon Aug 29, 2026
🎉 This issue has been resolved in version 2.0.0-alpha.9 🎉
The release is available on:
Your semantic-release bot 📦🚀