- Notifications
You must be signed in to change notification settings - Fork1k
Commitee789da
authored
fix: redirect users to
[As mentioned in theissue](#12056 (comment))the problem here is the fact this endpoint is returning a 401 instead ofa 200 in this specific case.Since we actually have enough information before performing thismutation to know that it'll fail in the case of a bad auth token we'dideally re-work the code not to call the mutation on logout and justperform the local clean up. Unfortunately it seems like the interactionsthat this mutation is having with React Query at large is necessary forour code to work as intended and thus it's not currently possible tomove the local clean up (the code inside of the `onSuccess`) outside ofthe mutation. Shout out to@Parkreiner for helping me confirm this.So until we can re-work the `AuthProvider` to be less brittle this PRchanges `onSuccess` to `onSettled` so that while the mutation stillfails with a 401, the local clean up still runs.Closes#12056/login
if their oauth token is invalid (#19429)1 parent02fc173 commitee789da
1 file changed
+16
-2
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
| |||
192 | 193 |
| |
193 | 194 |
| |
194 | 195 |
| |
195 |
| - | |
| 196 | + | |
196 | 197 |
| |
197 | 198 |
| |
198 |
| - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
199 | 205 |
| |
200 | 206 |
| |
201 | 207 |
| |
| |||
210 | 216 |
| |
211 | 217 |
| |
212 | 218 |
| |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
213 | 227 |
| |
214 | 228 |
| |
215 | 229 |
| |
|
0 commit comments
Comments
(0)