feat: use the new logout endpoint (v4-apps)#4170
Conversation
📝 WalkthroughWalkthroughThe ChangesLogout Endpoint Migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Description
Switches the "Logg ut"-link in the app header from the legacy Altinn 2 endpoint to the new Altinn 3 platform endpoint.
https://{altinnHost}/ui/authentication/LogOuthttps://platform.{altinnHost}/authentication/api/v1/logoutChanges
src/utils/urls/urlHelper.ts—logoutUrlAltinn(host)now builds the URL against the platform host (platform.<env>.altinn.<no|cloud>) and usesextractAltinnHostdirectly. Local-environment fallback (http://local.altinn.cloud[:port]/) and theundefinedreturn for unknown hosts are unchanged.src/utils/urls/urlHelper.test.ts— Updated expected URLs forlogoutUrlAltinnacross prod / TT02 / AT21 / YT01.The single callsite (
src/components/presentation/AppHeader/AppHeaderMenu.tsx) is untouched — it consumeslogoutUrlAltinn(window.location.host)and picks up the new URL automatically.Resulting URLs per environment
*.apps.altinn.no(prod)https://platform.altinn.no/authentication/api/v1/logout*.apps.tt02.altinn.no(TT02)https://platform.tt02.altinn.no/authentication/api/v1/logout*.apps.at21.altinn.cloud(AT21)https://platform.at21.altinn.cloud/authentication/api/v1/logout*.apps.yt01.altinn.cloud(YT01)https://platform.yt01.altinn.cloud/authentication/api/v1/logoutlocal.altinn.cloud[:port]http://local.altinn.cloud[:port]/(unchanged)undefined(unchanged)Related Issue(s)
Verification/QA
kind/*andbackport*label to this PR for proper release notes groupingSummary by CodeRabbit