[requestTokenManager] getToken () -> bad_authentication. Приложение: H2S.App.Starter, Сервис: OAuth2: OpenID
AXEH: LONG LIVE LEATERS Недоступно. Сертификаты для подписания приложения, как в консоли Cloud, так и в Cloud Console Google. Версии на физических устройствах. < /p>
Шаги, которые я следовал:
Я добавил свои сертификаты SHA1 и SHA256 в Cloud Console Console и Firebase. />
Код: Выделить всё
const loginWithGoogle = async (): Promise => {
try {
let idToken: string | null = null;
let email: string | null = null;
let name: string | null = null;
let picture: string | null = null;
if (Capacitor.isNativePlatform()) {
// 🔹 Login con Google su Android/iOS
const result = await FirebaseAuthentication.signInWithGoogle();
if (!result || !result.user || !result.credential?.idToken) {
throw new Error("Errore durante il login con Google.");
}
idToken = result.credential.idToken;
email = result.user.email;
name = result.user.displayName;
picture = result.user.photoUrl;
console.log("🔹 ID Token ricevuto:", idToken);
} else {
// 🔹 Login con Google su Web
const result = await signInWithPopup(auth, googleProvider);
if (!result.user) {
throw new Error("Google Sign-In fallito.");
}
idToken = await result.user.getIdToken();
email = result.user.email;
name = result.user.displayName;
picture = result.user.photoURL;
}
Нет решить проблему.>
Подробнее здесь: https://stackoverflow.com/questions/796 ... -bad-authe