fix(auth): handle Google sign-in popup dismissal gracefully#1878
Open
prakriti-shrestha wants to merge 1 commit intoruxailab:developfrom
Open
fix(auth): handle Google sign-in popup dismissal gracefully#1878prakriti-shrestha wants to merge 1 commit intoruxailab:developfrom
prakriti-shrestha wants to merge 1 commit intoruxailab:developfrom
Conversation
|
Author
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.



What does this PR do?
Fixes a bug where closing the Google sign-in popup mid-flow caused the sign-in page to freeze completely, requiring a full page reload to recover.
Related Issue
Closes #1877
Root Cause Analysis
Bug 1 -
SignInView.vue: wrong method to reset loading stateonGoogleSignInErrorwas calling:But
setLoadingis a mutation, not an action.dispatchsilently fails, leavingloading = trueforever - freezing all buttons.Bug 2 -
Auth.js: nofinallyblock insignInWithGoogleEvery other action (signin,logout,resetPassword) resets loading in afinallyblock.signInWithGooglehad nofinally, so any error left loading stuck even if Bug 1 was fixed.Bug 3 -
Auth.js: popup close treated as a real errorauth/popup-closed-by-useris a deliberate user action, not an error. It was being caught and shown as a generic error toast.Changes Made
src/features/auth/views/SignInView.vuestore.dispatch('setLoading', false)→store.commit('setLoading', false)inonGoogleSignInErrorsrc/features/auth/store/Auth.jsfinallyblock tosignInWithGoogleto always reset loading stateauth/popup-closed-by-userandauth/cancelled-popup-requestthese are intentional user actions and should not show an error toastFix Flow
Testing
Demo
Before: Throws error and the page freezes
After: No error thrown and the page is responsive.
signin_google_popup_solved.mp4