Commit 7d6b4cb
authored
fix: make vertex work in vscode playground again (#1645)
For some reason, when we do the gcp oauth exchange, we were asking for
access tokens that would be valid for 60h. GCP probably at some recent
point started denying these requests (because access tokens should not
live for 60h, that's absurd), so we trim the expiration time down to 1h,
which appears to fix things.
(We request a new oauth token for every single request in wasm, so the
lifetime of the token could literally be measured in seconds + clock
skew.)
<img width="521" alt="image"
src="https://github.com/user-attachments/assets/9bfde855-3c08-4928-8ef4-d77e3b5d1095"
/>
<img width="1092" alt="image"
src="https://github.com/user-attachments/assets/629cb64c-f0c9-46f3-b9a4-562e9f503a27"
/>
Also improve the error message when this does fail:
<img width="571" alt="image"
src="https://github.com/user-attachments/assets/122a25c0-040c-4509-8619-ec28e2b3cdd3"
/>1 parent 1c1fdb3 commit 7d6b4cb
1 file changed
Lines changed: 8 additions & 35 deletions
Lines changed: 8 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
35 | | - | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
| |||
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
98 | | - | |
| 103 | + | |
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
| |||
108 | 113 | | |
109 | 114 | | |
110 | 115 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
0 commit comments