- Notifications
You must be signed in to change notification settings - Fork1.1k
Commit421330a
committed
fix: resolve GitHub integration persistence issue
Fixes the issue where GitHub integration configuration doesn't persistwhen navigating away and back to the Settings page.Root cause: Race condition in OAuth callback flow where frontend checksauthentication status before backend has fully processed the token,combined with aggressive caching that shows stale unauthenticated state.Changes:- Add retry logic with exponential backoff (1s, 2s, 3s) for OAuth redirects- Show 'Completing authentication...' instead of immediate error- Improve cache management with 30s staleTime and refetchOnMount- Reset retry state when user manually retries authenticationThis ensures users see 'Authenticated' status after successful OAuth flowinstead of being asked to configure integration again.1 parent1d27d4f commit421330a
File tree
3 files changed
+75
-16
lines changed- site/src
- api/queries
- pages
- ExternalAuthPage
- UserSettingsPage/ExternalAuthPage
3 files changed
+75
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| |||
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
| |||
51 | 63 | | |
52 | 64 | | |
53 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
54 | 70 | | |
55 | 71 | | |
56 | 72 | | |
| |||
59 | 75 | | |
60 | 76 | | |
61 | 77 | | |
| 78 | + | |
62 | 79 | | |
63 | 80 | | |
64 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
| 32 | + | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 34 | + | |
| 35 | + | |
39 | 36 | | |
| 37 | + | |
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
| |||
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
51 | | - | |
| 49 | + | |
| 50 | + | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
58 | 77 | | |
59 | 78 | | |
60 | 79 | | |
| |||
71 | 90 | | |
72 | 91 | | |
73 | 92 | | |
74 | | - | |
75 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
76 | 107 | | |
77 | 108 | | |
78 | 109 | | |
| |||
92 | 123 | | |
93 | 124 | | |
94 | 125 | | |
95 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
96 | 130 | | |
97 | 131 | | |
98 | 132 | | |
| |||
113 | 147 | | |
114 | 148 | | |
115 | 149 | | |
| 150 | + | |
116 | 151 | | |
117 | | - | |
118 | 152 | | |
119 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
120 | 158 | | |
121 | 159 | | |
122 | 160 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
228 | 232 | | |
229 | 233 | | |
230 | 234 | | |
| |||
0 commit comments
Comments
(0)