auth fix
All checks were successful
Build Docker Images / test (push) Successful in 1m39s
Build Docker Images / build-and-push (push) Successful in 1m42s

This commit is contained in:
2025-11-25 23:30:18 +01:00
parent bb41926a31
commit aa6c54a692
2 changed files with 5 additions and 4 deletions

View File

@@ -52,8 +52,11 @@
{ {
_instance = this; _instance = this;
// Only initialize JavaScript Google SDK if we're NOT using platform-specific auth (i.e., web) // Initialize JavaScript Google SDK for web (both null service and WebGoogleAuthService)
if (GoogleAuthService == null) // Skip only for mobile platform-specific auth (MobileGoogleAuthService)
var isMobileAuth = GoogleAuthService != null && GoogleAuthService.GetType().Name == "MobileGoogleAuthService";
if (!isMobileAuth)
{ {
await InitializeGoogleSignIn(); await InitializeGoogleSignIn();
} }

View File

@@ -22,7 +22,6 @@ window.initGoogleSignIn = function(clientId) {
throw new Error("Google Sign-In library not ready"); throw new Error("Google Sign-In library not ready");
} }
// Używamy google.accounts.id - zwraca ID token (JWT credential)
google.accounts.id.initialize({ google.accounts.id.initialize({
client_id: clientId, client_id: clientId,
callback: handleCredentialResponse, callback: handleCredentialResponse,
@@ -37,7 +36,6 @@ window.initGoogleSignIn = function(clientId) {
window.requestGoogleSignIn = function() { window.requestGoogleSignIn = function() {
console.log("🚀 Requesting Google Sign-In..."); console.log("🚀 Requesting Google Sign-In...");
// Pokaż One Tap prompt (without deprecated notification callbacks for FedCM compatibility)
google.accounts.id.prompt(); google.accounts.id.prompt();
}; };