Commit 0964913
committed
refactor(app_check,windows): return token and expiry from Dart custom provider, clarify provider docs
The Dart FlutterApi now returns CustomAppCheckToken, a class carrying both the minted token and its wall-clock expiry in Unix epoch milliseconds, instead of just a string. This lets backends mint tokens with arbitrary lifetimes without the plugin hardcoding a refresh window, and it removes a 55-minute constant from the C++ plugin that assumed every backend mints ~1-hour tokens. Short-lived tokens for stricter posture and longer-lived tokens for fewer round-trips are both supported by the same API.
The Windows plugin's GetToken now pipes the expiry from Dart straight through to AppCheckToken.expire_time_millis, so the Firebase C++ SDK caches for the exact lifetime the backend chose.
Also updates stale provider docs on windows_providers.dart (the base and debug-provider docs previously described debug as the only supported Windows provider, which was already out of date once custom support landed) and expands WindowsCustomProvider's docs with a usage example showing a FirebaseAppCheckFlutterApi implementation.
Regenerates all Pigeon bindings (Dart, Kotlin, Swift, C++) from the updated source.1 parent 976a491 commit 0964913
File tree
8 files changed
+473
-45
lines changed- packages/firebase_app_check
- firebase_app_check_platform_interface
- lib/src
- pigeon
- pigeons
- firebase_app_check
- android/src/main/kotlin/io/flutter/plugins/firebase/appcheck
- ios/firebase_app_check/Sources/firebase_app_check
- windows
8 files changed
+473
-45
lines changedLines changed: 102 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
43 | 73 | | |
44 | 74 | | |
45 | 75 | | |
| |||
53 | 83 | | |
54 | 84 | | |
55 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
56 | 131 | | |
57 | 132 | | |
58 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
59 | 141 | | |
60 | 142 | | |
61 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
62 | 150 | | |
63 | 151 | | |
64 | 152 | | |
| |||
187 | 275 | | |
188 | 276 | | |
189 | 277 | | |
190 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
191 | 288 | | |
192 | 289 | | |
193 | 290 | | |
194 | 291 | | |
195 | 292 | | |
196 | 293 | | |
197 | 294 | | |
198 | | - | |
| 295 | + | |
199 | 296 | | |
200 | 297 | | |
201 | 298 | | |
| |||
207 | 304 | | |
208 | 305 | | |
209 | 306 | | |
210 | | - | |
| 307 | + | |
211 | 308 | | |
212 | 309 | | |
213 | 310 | | |
| |||
Lines changed: 128 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 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 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
74 | 176 | | |
75 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
76 | 186 | | |
77 | 187 | | |
78 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
79 | 197 | | |
80 | 198 | | |
81 | 199 | | |
| |||
201 | 319 | | |
202 | 320 | | |
203 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
204 | 329 | | |
205 | 330 | | |
206 | | - | |
| 331 | + | |
207 | 332 | | |
208 | 333 | | |
209 | 334 | | |
| |||
215 | 340 | | |
216 | 341 | | |
217 | 342 | | |
218 | | - | |
| 343 | + | |
219 | 344 | | |
220 | 345 | | |
221 | 346 | | |
| |||
231 | 356 | | |
232 | 357 | | |
233 | 358 | | |
234 | | - | |
| 359 | + | |
235 | 360 | | |
236 | 361 | | |
237 | 362 | | |
| |||
Lines changed: 7 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
102 | | - | |
| 101 | + | |
103 | 102 | | |
104 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
| 120 | + | |
120 | 121 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 122 | + | |
| 123 | + | |
130 | 124 | | |
131 | 125 | | |
132 | 126 | | |
| |||
0 commit comments