Skip to content

Commit 7c7059d

Browse files
committed
Update auth_service.dart
1 parent 631eb9d commit 7c7059d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

lib/core/services/auth_service.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ class AuthService {
154154
String? clientId;
155155
String? serverClientId;
156156

157-
if (Platform.isAndroid) {
157+
if (kIsWeb) {
158+
clientId = _googleServerClientId.isNotEmpty ? _googleServerClientId : null;
159+
serverClientId = null;
160+
} else if (Platform.isAndroid) {
158161
// Android: clientId is auto-detected, only serverClientId needed for idToken
159162
serverClientId =
160163
_googleServerClientId.isNotEmpty ? _googleServerClientId : null;
@@ -179,7 +182,9 @@ class AuthService {
179182

180183
/// Check if Google Sign-In is properly configured
181184
bool get isGoogleSignInConfigured {
182-
if (Platform.isAndroid) {
185+
if (kIsWeb) {
186+
return _googleServerClientId.isNotEmpty;
187+
} else if (Platform.isAndroid) {
183188
return _googleServerClientId.isNotEmpty;
184189
} else if (Platform.isIOS) {
185190
return _googleClientIdIOS.isNotEmpty;

0 commit comments

Comments
 (0)