Commit 43e954f
Charlie Tonneslan
fix: preserve existing refresh_token when server omits it in refresh response
Per RFC 6749 Section 6, the authorization server MAY issue a new
refresh token in the refresh response. When it does not, the client
must preserve the existing one. The current implementation replaces
current_tokens with the parsed response as-is, which discards the
stored refresh_token when the server omits it.
After the first successful refresh, can_refresh_token() returns False
and all subsequent refreshes fail, forcing full re-authentication.
Many OAuth providers omit refresh_token from refresh responses by
default (Google, Auth0 without rotation, Okta in persistent mode).
Github-Issue: #22701 parent 75a80b6 commit 43e954f
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
461 | 472 | | |
462 | 473 | | |
463 | 474 | | |
| |||
0 commit comments