diff --git a/.example.env b/.example.env index 55045c71..5ff66ff0 100644 --- a/.example.env +++ b/.example.env @@ -44,7 +44,7 @@ NEXT_PUBLIC_APP_NAME=GhostClass # âš ī¸ App version displayed in footer and health checks # 🔨 Build-time (Infisical `/build-time` folder) -NEXT_PUBLIC_APP_VERSION=4.7.1 +NEXT_PUBLIC_APP_VERSION=4.7.2 # âš ī¸ Your production domain WITHOUT https:// # All URL-based variables are derived from this. @@ -379,7 +379,7 @@ REQUEST_SIGNATURE_MAX_AGE=600 # âš ī¸ Minimum supported app version required to bypass forced update # 🚀 Runtime (Infisical `/runtime` folder → Server Env Var) -MIN_APP_VERSION=4.7.1 +MIN_APP_VERSION=4.7.2 # â„šī¸ Enforce Firebase App Check for all mobile clients in production # Valid: "true", "false" (default: false in dev, true recommended in prod) diff --git a/mobile/lib/config/app_config.dart b/mobile/lib/config/app_config.dart index df964827..8409eae2 100644 --- a/mobile/lib/config/app_config.dart +++ b/mobile/lib/config/app_config.dart @@ -89,7 +89,7 @@ class AppConfig { /// Current application version static String get appVersion => - const String.fromEnvironment('APP_VERSION', defaultValue: '4.7.1'); + const String.fromEnvironment('APP_VERSION', defaultValue: '4.7.2'); /// Commit SHA injected by CI for release builds. static String get appCommitSha => diff --git a/mobile/lib/services/dio_service.dart b/mobile/lib/services/dio_service.dart index 31b031ae..d88b56f8 100644 --- a/mobile/lib/services/dio_service.dart +++ b/mobile/lib/services/dio_service.dart @@ -224,6 +224,7 @@ class DioService { const errorMsg = 'App Check token is empty - verify Firebase activation'; options.extra['appCheckError'] = errorMsg; + options.headers['X-Firebase-AppCheck'] = 'unverified'; AppLogger.w('DioService: $errorMsg (continuing in fail-open mode)'); } } on Object catch (e) { @@ -236,6 +237,7 @@ class DioService { ); options.extra['appCheckError'] = e.toString(); options.extra['appCheckTransient'] = _isTransientAppCheckFailure(e); + options.headers['X-Firebase-AppCheck'] = 'unverified'; } } diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index b3b0d6a0..072b928b 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 4.7.1+1 +version: 4.7.2+1 environment: sdk: ^3.11.4 diff --git a/package-lock.json b/package-lock.json index d85e7c92..82152706 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ghostclass", - "version": "4.7.1", + "version": "4.7.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ghostclass", - "version": "4.7.1", + "version": "4.7.2", "dependencies": { "@hookform/resolvers": "^7.0.6", "@radix-ui/react-alert-dialog": "^1.1.23", diff --git a/package.json b/package.json index 9f34989e..e1b2535f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostclass", - "version": "4.7.1", + "version": "4.7.2", "private": true, "engines": { "node": ">=22.12.0", diff --git a/public/openapi/openapi.yaml b/public/openapi/openapi.yaml index aaa1f428..932bfb30 100644 --- a/public/openapi/openapi.yaml +++ b/public/openapi/openapi.yaml @@ -6,7 +6,7 @@ openapi: 3.1.0 info: title: GhostClass API - version: 4.7.1 + version: 4.7.2 description: | **GhostClass API** provides endpoints for authentication, profile synchronization, attendance integrations with EzyGo, telemetry, and build provenance. diff --git a/src/app/api/auth/save-token/route.ts b/src/app/api/auth/save-token/route.ts index fda8570f..b1c9f8a2 100644 --- a/src/app/api/auth/save-token/route.ts +++ b/src/app/api/auth/save-token/route.ts @@ -492,7 +492,8 @@ const handler = async ( current_year: syncRes?.academic?.current_year ?? info.current_year, }; - if (authType !== "app-check") { + const isMobileClient = isAppCheck || !!fcm_token; + if (!isMobileClient) { await setAuthCookie(token); return NextResponse.json(response);