30 Commits
Author SHA1 Message Date
Nick CookeandAndrew Heard 4639d4e97e fix(backoff): allow retry when device clock moves backward (#137)
Signed-off-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
Co-authored-by: Andrew Heard <andrewheard@google.com>
2026-11-06 13:38:26 -05:00
Andrew Heard ebd7f0547a feat(debug): add debugToken: initializer and debugTokenSource (#134)
Add initWithServiceName:resourceName:baseURL:APIKey:requestHooks:
debugToken: (Swift: init(serviceName:resourceName:baseURL:apiKey:
requestHooks:debugToken:)) to GACAppCheckDebugProvider so callers can
supply a debug token resolved outside the SDK, such as one the Firebase
CLI saved to ~/.config/configstore/firebase-appcheck.json. The existing
initializer delegates to it with a nil token.

Tokens resolve in this order: the AppCheckDebugToken or
FIRAAppCheckDebugToken environment variable, the provided token, the
stored local token, then a newly generated one. The provided token is
trimmed, and an empty result falls back to the local token. When it is
used, no local token is generated, stored, or logged; a debug-level
message (I-GAC004005) is logged instead, and its exchanges don't change
the local token's registered state.

Also add debugTokenSource and AppCheckCoreDebugTokenSource
(GACAppCheckDebugTokenSource: local, environmentVariable, provided),
which report where the current token came from. The enum is Sendable
and marked @nonexhaustive when the compiler supports it, so new sources
can be added without breaking Swift clients.
2026-11-06 12:23:01 -05:00
Daniel Morfa Vega 49687692b6 fix: refresh cached token when it was received in the future (#132) 2026-11-05 15:46:21 -05:00
c7eb17e554 Rewrite AppCheckCore in Swift (#111)
Signed-off-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
Co-authored-by: Nick Cooke <nickcooke@google.com>
2026-09-23 18:22:08 -04:00
Paul Beusterien 1a2da7fca1 fix: capture request date before network request to prevent clock skew/suspension bugs (#113) 2026-09-11 08:17:58 -07:00
Nick Cooke 8ceec5f0b6 refactor: migrate GACAppAttestProviderTests off OCMock (Milestone 2) (#109)
Signed-off-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
2026-07-27 21:38:27 -04:00
Nick Cooke fd4a710637 fix(url): point to firebase docs over gcp docs (#98) 2026-06-16 20:08:13 -04:00
f6b4582ed1 feat: Add Recaptcha attestation provider (#94)
Signed-off-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
Co-authored-by: Hitesh Maurya <hiteshmaurya@google.com>
Co-authored-by: Paul Beusterien <paulbeusterien@google.com>
2026-06-09 16:44:19 -04:00
Andrew Heardandgoogle-labs-jules[bot] 3d50c0ed6d [AppCheckCore] Fix import in GACAppCheckAPIService.h (#83)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-07-24 16:57:51 -04:00
Nick Cooke 4b265b9557 [AppCheckCore] Skip local cache when making network requests (#78) 2024-10-17 19:26:14 -04:00
Paul Beusterien 33bb9af2b1 [v11] Merge main (#64) 2024-06-17 16:52:41 -04:00
Nick Cooke 34e4ef0800 [v11] Migrate to GoogleUtilities v8 (#61)
Signed-off-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
2024-06-12 15:22:18 -04:00
Andrew Heard 7a21efdb57 Add clientDataHash to App Attest failure reasons (#50) 2024-03-28 16:49:12 -04:00
Andrew Heard 96ff7d1065 Add DCError descriptions to App Attest failure reasons (#47) 2024-01-16 16:26:14 -05:00
Andrew Heard 3a923e73b9 Add TODO to fix token(forcingRefresh: true) issue (#42) (#43) 2023-11-08 14:26:27 -05:00
Andrew Heard 5889dd55eb Fix warning due to NSUInteger length on watchOS (#36) 2023-10-27 17:24:53 -04:00
Andrew Heard 6417d6a215 Add failure reasons for App Attest error cases (#32) 2023-10-24 18:03:48 -04:00
Andrew Heard ba91f3f518 Fix C function warnings in Xcode 14.3+ (#28) 2023-09-08 17:36:04 -04:00
Andrew Heard d6b709f294 Set default log level in load instead of getter (#23) 2023-09-06 17:03:58 -04:00
Andrew Heard abe7026e19 Set default log level to warning (#22) 2023-09-06 10:45:30 -04:00
Andrew Heard f77879ca75 Return GACAppCheckTokenResult in limitedUseTokenWithCompletion (#20) 2023-08-31 10:36:31 -04:00
Andrew Heard f2cc90d0ce Return GACAppCheckTokenResult in tokenForcingRefresh handler (#19) 2023-08-30 14:22:33 -04:00
Andrew Heard f191868209 Add GACAppCheckTokenResult type (#18) 2023-08-30 11:44:09 -04:00
Andrew Heard f85d46bd67 Remove get prefix from getToken and getLimitedUseToken (#14) 2023-08-22 18:08:51 -04:00
Andrew Heard 8d0bdd3f24 Add generation of limited-use tokens with a TTL of 5 mins (#11) 2023-08-22 12:56:00 -04:00
Andrew Heard b12f472db8 Rename instanceName and storageID to serviceName (#11599)
For consistency, renamed both instanceName and storageID to serviceName for consistency.

In all cases, the serviceName is an identifier that differentiates multiple GACAppCheck instances such as when there are multiple FIRApps in use, or multiple dependent SDKs (e.g., Firebase and Google Sign-In). This unique identifier ensures their state is not shared in the Keychain or in User Defaults.
2023-08-01 13:48:42 -04:00
Andrew Heard fe4b137399 Remove App Check Core Interop SDK (#11595)
The ObjC Protocol-only interop SDK is not needed by our integrators.
2023-08-01 13:42:29 -04:00
Andrew Heard 6446e93e83 Implement FIRAppCheckSettings as subclass (#11597)
Added a class GACAppCheckSettings that conforms to GACAppCheckSettingsProtocol and implemented FIRAppCheckSettings as a subclass of it.
2023-08-01 13:37:56 -04:00
Andrew Heard 90bcc7767f Make tokenDelegate nullable in GACAppCheck (#11592)
Made the tokenDelegate parameter nullable in the constructor for GACAppCheck since the feature is not used by all integrators. E.g., it is not needed if token refresh isn't used -- 'tokenDidUpdate:instanceName:' would never get called.

- Added parameter documentation to the 'initWithInstanceName:appCheckProvider:settings:tokenDelegate:resourceName:keychainAccessGroup' constructor in GACAppCheck.
- Renamed the umbrella header from AppCheck.h to AppCheckCore.h to match the framework name.
2023-08-01 13:31:24 -04:00
Andrew Heard 2d2d0e6228 Renamed AppCheck to AppCheckCore (#11581)
Renamed the App Check (Lite) SDK to App Check Core.
2023-07-21 10:17:20 -04:00