Commit 510e68b
authored
fix: session upgrade percentage should be based on session, not request (#2371)
In #2356 a session would be upgraded to v2 refresh tokens based on the
number of requests for that session. If you set a percentage value of
10% and there's 100 refresh token requests per session, all sessions
would be upgraded within 1 day.
This is rectified here by converting the session ID to a value in the
`[0, 100)` range making sure that a random selection of sessions would
be upgraded consistently.1 parent f1fabc4 commit 510e68b
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
414 | 415 | | |
415 | 416 | | |
416 | 417 | | |
417 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
418 | 427 | | |
419 | 428 | | |
420 | 429 | | |
| |||
0 commit comments