Commit 935e594
CIS Guru
fix: Prevent login form double submission causing blank page redirect
Added submission guard to prevent multiple rapid clicks on login button:
- Added isSubmitting flag to track login operation state
- Early return if already submitting (prevents concurrent logins)
- Disabled submit button during login process
- Visual feedback: spinner and 'Logging in...' text while submitting
- Error message cleared on new submission attempt
- finally block ensures flag reset even on exceptions
Fixes issue where clicking login button multiple times redirected user
to blank page due to concurrent authentication attempts.1 parent 4039221 commit 935e594
1 file changed
Lines changed: 45 additions & 20 deletions
File tree
Lines changed: 45 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
43 | 53 | | |
44 | 54 | | |
45 | 55 | | |
| |||
66 | 76 | | |
67 | 77 | | |
68 | 78 | | |
| 79 | + | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
| |||
103 | 114 | | |
104 | 115 | | |
105 | 116 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
121 | 122 | | |
122 | | - | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
124 | 149 | | |
125 | | - | |
| 150 | + | |
126 | 151 | | |
127 | | - | |
| 152 | + | |
128 | 153 | | |
129 | 154 | | |
130 | 155 | | |
| |||
0 commit comments