我正在开发一个需要通过 FireBase 使用 Apple 和 Google 登录的应用程序。在开发模式下,signIn 与两者都可以正常工作。但在 TestFlight 中部署后,我无法再使用它们登录。
还有 SignIn with Google 和 Apple 的代码:
Google:
import * as Google from "expo-google-app-auth";
try {
const result = await Google.logInAsync({
iosClientId:
"##############.apps.googleusercontent.com",
scopes: ["profile", "email"],
});
if (result.type === "success") {
const { idToken, accessToken } = result;
const credential = firebase.auth.GoogleAuthProvider.credential(
idToken,
accessToken
);
var user = firebase.auth().currentUser;
user.linkWithCredential(credential).then(async () => {}
Run Code Online (Sandbox Code Playgroud)
Apple:
import * as AppleAuthentication from "expo-apple-authentication";
import * as Crypto from "expo-crypto";
try {
const …Run Code Online (Sandbox Code Playgroud)