.NET 10 and few minor things
This commit is contained in:
@@ -5,9 +5,23 @@ window.initGoogleSignIn = function(clientId) {
|
||||
console.log("Google Sign-In already initialized");
|
||||
return;
|
||||
}
|
||||
|
||||
console.log("🔐 Initializing Google Sign-In (ID Token flow) with clientId:", clientId);
|
||||
|
||||
|
||||
console.log("🔐 Initializing Google Sign-In (ID Token flow)");
|
||||
console.log("📋 Received clientId:", clientId);
|
||||
console.log("📋 ClientId type:", typeof clientId);
|
||||
console.log("📋 ClientId length:", clientId ? clientId.length : 0);
|
||||
|
||||
if (!clientId || clientId === '' || clientId === 'null' || clientId === 'undefined') {
|
||||
console.error("❌ Invalid clientId received:", clientId);
|
||||
throw new Error("ClientId is null, empty, or invalid");
|
||||
}
|
||||
|
||||
// Check if Google library is loaded
|
||||
if (typeof google === 'undefined' || !google.accounts || !google.accounts.id) {
|
||||
console.error("❌ Google Sign-In library not loaded yet!");
|
||||
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,
|
||||
@@ -15,7 +29,7 @@ window.initGoogleSignIn = function(clientId) {
|
||||
auto_select: false,
|
||||
cancel_on_tap_outside: true
|
||||
});
|
||||
|
||||
|
||||
googleInitialized = true;
|
||||
console.log("✅ Google Sign-In initialized successfully");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user