Remove Google auth: drop google_sign_in, google-services.json, gradle plugin; keep email+password+fingerprint
This commit is contained in:
@@ -1,75 +0,0 @@
|
||||
{
|
||||
"settings": {
|
||||
"password": "$2b$10$aRCl.p1TMRImNxOpC7VtM.2f0K5/w1JV97jimQCDF/MjJalFRMrWW"
|
||||
},
|
||||
"providerConnections": [
|
||||
{
|
||||
"apiKey": "d3a69c79099b4b8881b6219c659ae34b.E2nn6LZwaASE6XAyRrYnvP7P",
|
||||
"testStatus": "unavailable",
|
||||
"providerSpecificData": {
|
||||
"connectionProxyEnabled": false,
|
||||
"connectionProxyUrl": "",
|
||||
"connectionNoProxy": ""
|
||||
},
|
||||
"modelLock_glm-4.7-flash": "2026-08-09T16:35:36.924Z",
|
||||
"lastError": "[410]: {\"error\":\"glm-5 was retired at 2026-07-15 00:00:00 -0700 PDT (ref: 8f5b953d-f9a0-4f59-85a5-d2",
|
||||
"errorCode": 410,
|
||||
"lastErrorAt": "2026-08-09T16:33:37.407Z",
|
||||
"backoffLevel": 0,
|
||||
"modelLock_glm-5": "2026-08-09T16:34:07.407Z",
|
||||
"id": "91a52c6c-65b6-4cb2-a9fc-8a6021b4807e",
|
||||
"provider": "ollama",
|
||||
"authType": "apikey",
|
||||
"name": "MyProdOllama",
|
||||
"email": null,
|
||||
"priority": 1,
|
||||
"isActive": true,
|
||||
"createdAt": "2026-08-09T14:22:55.025Z",
|
||||
"updatedAt": "2026-08-09T16:33:40.084Z"
|
||||
}
|
||||
],
|
||||
"providerNodes": [],
|
||||
"proxyPools": [],
|
||||
"apiKeys": [
|
||||
{
|
||||
"id": "27107ebd-bc67-4646-a5c0-8c493cb8c3db",
|
||||
"key": "sk-15eb00df2b503ba1-lqsnqj-c0e8da8a",
|
||||
"name": "Default Key",
|
||||
"machineId": "15eb00df2b503ba1",
|
||||
"isActive": true,
|
||||
"createdAt": "2026-08-09T14:17:12.383Z"
|
||||
},
|
||||
{
|
||||
"id": "c3c7ccae-309c-4c2e-9247-a43f1bdda8b8",
|
||||
"key": "sk-15eb00df2b503ba1-uiqvdz-cc53955f",
|
||||
"name": "MyFirstProdKey",
|
||||
"machineId": "15eb00df2b503ba1",
|
||||
"isActive": true,
|
||||
"createdAt": "2026-08-09T14:40:58.531Z"
|
||||
}
|
||||
],
|
||||
"combos": [
|
||||
{
|
||||
"id": "3ba4607b-38b1-4bfc-b473-5a1cc9a5ee80",
|
||||
"name": "myagent",
|
||||
"kind": null,
|
||||
"models": [
|
||||
"ollama/glm-4.7-flash",
|
||||
"mmf/mimo-auto",
|
||||
"ollama/glm-5",
|
||||
"ollama/gpt-oss:120b",
|
||||
"ollama/kimi-k2.5",
|
||||
"ollama/minimax-m2.5",
|
||||
"ollama/minimax-m3",
|
||||
"ollama/qwen3.5",
|
||||
"myagent"
|
||||
],
|
||||
"createdAt": "2026-08-09T14:39:51.460Z",
|
||||
"updatedAt": "2026-08-09T17:17:04.778Z"
|
||||
}
|
||||
],
|
||||
"modelAliases": {},
|
||||
"customModels": [],
|
||||
"mitmAlias": {},
|
||||
"pricing": {}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_sign_in/google_sign_in.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:login_vault_app/auth_service.dart';
|
||||
import 'package:login_vault_app/dashboard_screen.dart';
|
||||
@@ -83,24 +82,6 @@ class _AuthScreenState extends State<AuthScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _signInGoogle() async {
|
||||
setState(() => _busy = true);
|
||||
try {
|
||||
final gs = GoogleSignIn(scopes: ['email']);
|
||||
final account = await gs.signIn();
|
||||
if (account?.email != null) {
|
||||
await widget.auth.registerWithGoogle(account!.email);
|
||||
_goToDashboard(account.email);
|
||||
} else {
|
||||
setState(() => _error = 'Google sign-in dibatalkan');
|
||||
}
|
||||
} catch (e) {
|
||||
setState(() => _error = 'Google sign-in gagal: ${e.toString()}');
|
||||
} finally {
|
||||
if (mounted) setState(() => _busy = false);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -145,12 +126,6 @@ class _AuthScreenState extends State<AuthScreen> {
|
||||
? 'Belum punya akun? Daftar'
|
||||
: 'Sudah punya akun? Masuk'),
|
||||
),
|
||||
const Divider(),
|
||||
OutlinedButton.icon(
|
||||
onPressed: _signInGoogle,
|
||||
icon: const Icon(Icons.login),
|
||||
label: const Text('Lanjut dengan Google'),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@@ -24,20 +24,10 @@ class AuthService {
|
||||
key: AppConstants.secureKeyAppPassword, value: appPassword);
|
||||
}
|
||||
|
||||
Future<void> registerWithGoogle(String email) async {
|
||||
await _storage.write(key: AppConstants.secureKeyEmail, value: email);
|
||||
final existing = await getAppPassword();
|
||||
if (existing == null) {
|
||||
await _storage.write(
|
||||
key: AppConstants.secureKeyAppPassword, value: '__google__');
|
||||
}
|
||||
}
|
||||
|
||||
/// Verify the entered app password against the stored one.
|
||||
Future<bool> verifyPassword(String password) async {
|
||||
final stored = await getAppPassword();
|
||||
if (stored == null) return false;
|
||||
if (stored == '__google__') return true; // google users: any pass ok
|
||||
return stored == password;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,14 +6,12 @@ import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import flutter_secure_storage_macos
|
||||
import google_sign_in_ios
|
||||
import local_auth_darwin
|
||||
import shared_preferences_foundation
|
||||
import sqflite_darwin
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
||||
FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin"))
|
||||
LocalAuthPlugin.register(with: registry.registrar(forPlugin: "LocalAuthPlugin"))
|
||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||
|
||||
64
pubspec.lock
64
pubspec.lock
@@ -168,54 +168,6 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
google_identity_services_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_identity_services_web
|
||||
sha256: "5d187c46dc59e02646e10fe82665fc3884a9b71bc1c90c2b8b749316d33ee454"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.3+1"
|
||||
google_sign_in:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: google_sign_in
|
||||
sha256: d0a2c3bcb06e607bb11e4daca48bd4b6120f0bbc4015ccebbe757d24ea60ed2a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.0"
|
||||
google_sign_in_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_sign_in_android
|
||||
sha256: d5e23c56a4b84b6427552f1cf3f98f716db3b1d1a647f16b96dbb5b93afa2805
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.2.1"
|
||||
google_sign_in_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_sign_in_ios
|
||||
sha256: "102005f498ce18442e7158f6791033bbc15ad2dcc0afa4cf4752e2722a516c96"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.9.0"
|
||||
google_sign_in_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_sign_in_platform_interface
|
||||
sha256: "5f6f79cf139c197261adb6ac024577518ae48fdff8e53205c5373b5f6430a8aa"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.0"
|
||||
google_sign_in_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_sign_in_web
|
||||
sha256: "460547beb4962b7623ac0fb8122d6b8268c951cf0b646dd150d60498430e4ded"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.4+4"
|
||||
hooks:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -224,22 +176,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
http:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http
|
||||
sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.6.0"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.2"
|
||||
intl:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -13,7 +13,6 @@ dependencies:
|
||||
path: ^1.9.0
|
||||
crypto: ^3.0.3
|
||||
flutter_secure_storage: ^9.0.0
|
||||
google_sign_in: ^6.2.1
|
||||
provider: ^6.1.2
|
||||
shared_preferences: ^2.2.2
|
||||
local_auth: ^2.3.0
|
||||
|
||||
Reference in New Issue
Block a user