MO-Fuel-Tax-Back/lib/services/cloud_oauth_config.dart

53 lines
2.5 KiB
Dart

/// Fill these in once the corresponding OAuth apps/registrations exist —
/// see README.md "Manual setup required" for exact steps per provider.
class CloudOAuthConfig {
// --- Google Drive ---
//
// - Android sign-in (Credential Manager-based, as of google_sign_in v7)
// authenticates using a *Web application* type OAuth client's ID, not
// the Android client's own ID. The separate Android OAuth client
// (registered with the package name + debug/release SHA-1) is still
// required, but only to let Credential Manager verify this specific
// signed app — its client ID itself is never referenced here.
// - iOS uses its own iOS-type OAuth client ID directly.
/// The Web application OAuth client ID. Required for sign-in to work on
/// Android.
static const String? googleAndroidServerClientId =
'482287068996-rea2e3fcbqeb0dq3ogh40ro8e1fm2m5j.apps.googleusercontent.com';
/// The iOS OAuth client ID. Leave null if GIDClientID is instead set
/// directly in ios/Runner/Info.plist.
static const String? googleIosClientId = null; // TODO: fill in
// --- Dropbox ---
//
// From a "Full Dropbox" access app at dropbox.com/developers/apps.
/// The app's key (client ID for OAuth2 PKCE — no secret needed).
static const String? dropboxAppKey = 'tmrok3snmkqpu1m';
/// Custom URL scheme redirect registered in the Dropbox app console.
/// The scheme "mofueltaxback-dropbox" is already wired up in
/// AndroidManifest.xml / Info.plist, so unless you have a reason to pick
/// a different scheme, use exactly:
/// "mofueltaxback-dropbox://oauth2redirect"
static const String? dropboxRedirectUri = 'mofueltaxback-dropbox://oauth2redirect';
// --- OneDrive (Microsoft Graph) ---
//
// From an app registration in Azure Portal → Entra ID → App
// registrations, with Graph delegated permissions Files.ReadWrite.All +
// offline_access, redirect URI registered as a "Mobile and desktop
// application" platform.
/// The Application (client) ID from the Azure app registration.
static const String? oneDriveClientId = '87ef0bae-89ff-4359-94df-64de333cfc08';
/// Custom URL scheme redirect registered in Azure. The scheme
/// "mofueltaxback-onedrive" is already wired up in AndroidManifest.xml /
/// Info.plist, so unless you have a reason to pick a different scheme,
/// register and use exactly:
/// "mofueltaxback-onedrive://auth"
static const String? oneDriveRedirectUri = 'mofueltaxback-onedrive://auth';
}