Commit d43d034
committed
fix: add two-tier locking to prevent iframe race conditions
- Add global iframe lock to serialize iframe authorization requests
- Keep per-audience locking for refresh token flows (preserves MRRT performance)
- Fixes 'Invalid state' errors when multiple audiences requested in parallel
- Resolves regression introduced in v2.8.0 by PR #1408
Two-tier locking strategy:
- Outer lock (per-audience): Prevents duplicate calls for same audience
- Inner lock (global iframe): Prevents Auth0 session state conflicts
Refresh token flows bypass the inner lock and remain fully parallel.
Iframe flows acquire both locks to ensure correctness.1 parent 506894f commit d43d034
2 files changed
+46
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
1023 | 1024 | | |
1024 | 1025 | | |
1025 | 1026 | | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
1029 | | - | |
| 1027 | + | |
1030 | 1028 | | |
1031 | | - | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
1032 | 1034 | | |
1033 | | - | |
1034 | | - | |
| 1035 | + | |
| 1036 | + | |
1035 | 1037 | | |
1036 | 1038 | | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
1047 | | - | |
1048 | | - | |
1049 | | - | |
1050 | | - | |
1051 | 1039 | | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
1052 | 1065 | | |
1053 | 1066 | | |
1054 | 1067 | | |
| |||
1104 | 1117 | | |
1105 | 1118 | | |
1106 | 1119 | | |
| 1120 | + | |
| 1121 | + | |
1107 | 1122 | | |
1108 | 1123 | | |
1109 | 1124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
| |||
0 commit comments