Commit be1a783
authored
Example apps in SPO mode: Use token expiry from API response instead of token parsing (microsoft#25165)
## Description
This PR fixes SPO auth for most example apps. You can run example apps
with SPO via `npm run start:spo`. This addresses the bug
[AB#45538](https://dev.azure.com/fluidframework/internal/_workitems/edit/45538).
Auth was broken because push tokens didn't pass auth token validation,
which in turn broke our token cache, as token validation was used to get
the token expiry time via token parsing. The push token couldn't be
parsed as it's encrypted, see also the internal discussion [in
Teams](https://teams.microsoft.com/l/message/19:53328301da384b33bcc81111124e3ab4@thread.skype/1754343252351?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&groupId=422665a0-7ad3-4d0d-9171-e8881d0397d9&parentMessageId=1754343252351&teamName=Loop&channelName=Bugs%20%F0%9F%90%9B&createdTime=1754343252351).
Repro of the bug was to just run `npm run start:spo` with any of the
example apps, after having run `getKeys` to get the right credentials
into your environment variables.1 parent 700747a commit be1a783
File tree
4 files changed
+27
-16
lines changed- packages/utils
- odsp-doclib-utils/src
- tool-utils
- src
4 files changed
+27
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
194 | 201 | | |
195 | | - | |
| 202 | + | |
196 | 203 | | |
197 | 204 | | |
198 | 205 | | |
| |||
241 | 248 | | |
242 | 249 | | |
243 | 250 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
| 251 | + | |
248 | 252 | | |
249 | 253 | | |
250 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
| 68 | + | |
70 | 69 | | |
71 | | - | |
| 70 | + | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
75 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
76 | 80 | | |
77 | | - | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| |||
189 | 193 | | |
190 | 194 | | |
191 | 195 | | |
192 | | - | |
| 196 | + | |
193 | 197 | | |
194 | 198 | | |
195 | 199 | | |
| |||
219 | 223 | | |
220 | 224 | | |
221 | 225 | | |
222 | | - | |
| 226 | + | |
223 | 227 | | |
224 | 228 | | |
225 | 229 | | |
| |||
266 | 270 | | |
267 | 271 | | |
268 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
269 | 280 | | |
270 | 281 | | |
271 | 282 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments