auth fix
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user