fix: handle external login state and emit readiness event - #13493
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the login UX for OIDC/SAML2 “ticket” callbacks by masking the login UI while an external-login ticket is being processed and by notifying the parent view when external-login handling is complete (so the UI can be shown again if login didn’t succeed).
Changes:
- Add an
externalLoginPendingmask/loader in the login page when OIDC/SAML2 tickets are present in the URL. - Emit an
external-login-readyevent fromlogin-form.vueafter external-ticket handling finishes (when the user is not logged in). - Await navigation to
homeafter successful login.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| frontend/src/views/login/index.vue | Adds a full-screen loading mask while external-login tickets are pending and hides the login container until readiness is emitted. |
| frontend/src/views/login/components/login-form.vue | Emits readiness after external-ticket processing; awaits post-login navigation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+52
to
+56
| const hasExternalLoginTicket = () => { | ||
| const url = new URL(window.location.href); | ||
| const fragmentParams = new URLSearchParams(url.hash.startsWith('#') ? url.hash.slice(1) : url.hash); | ||
| return Boolean( | ||
| fragmentParams.get('oidc_ticket') || |
Comment on lines
611
to
615
| localStorage.removeItem('dashboardCache'); | ||
| localStorage.removeItem('upgradeChecked'); | ||
| routerToName('home'); | ||
| clearLoginKeydownHandler(); | ||
| await routerToName('home'); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.