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;
// Only initialize JavaScript Google SDK if we're NOT using platform-specific auth (i.e., web)
if (GoogleAuthService == null)
// Initialize JavaScript Google SDK for web (both null service and WebGoogleAuthService)
// Skip only for mobile platform-specific auth (MobileGoogleAuthService)
var isMobileAuth = GoogleAuthService != null && GoogleAuthService.GetType().Name == "MobileGoogleAuthService";
if (!isMobileAuth)
{
await InitializeGoogleSignIn();
}

View File

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