gpt4 book ai didi

ios - 在Flutter应用中使用Firebase进行社交登录(Google,Facebook,Apple登录)是否是强制性的

转载 作者:行者123 更新时间:2023-12-03 04:46:27 25 4
gpt4 key购买 nike

我正在尝试在flutter应用程序中实现社交登录,并且我不想使用Firebase,我在google和开发论坛上进行了探索,所有这些建议都大都建议使用firebase。我可以帮我一个忙吗
如果可以建议主要用于google,facebook,twitter和apple的社交登录插件/插件会更好。

最佳答案

快速答案是否。

Flutter与Firebase并不严格相关,firebase只是一种选择。

有一个 Dart 包https://pub.dev/packages/social_login,您可以将FaceBook帐户等用于此类目的。

// Import package
import 'package:social_login/social_login.dart';

// Instantiate it
final socialLogin = SocialLogin();

//Before calling any methods, set the configuration
socialLogin.setConfig(SocialConfig(
facebookAppId: FACEBOOK_APP_ID,
googleWebClientId: GOOGLE_WEB_CLIENT_ID, /*In case a Google tokenId is needed*/
twitterConsumer: TWITTER_CONSUMER_KEY,
twitterSecret: TWITTER_CONSUMER_SECRET,
));

// Get current logged user
final FacebookUser facebookUser = await socialLogin.getCurrentFacebookUser();
final GoogleUser googleUser = await socialLogin.getCurrentGoogleUser();
final TwitterUser twitterUser = await socialLogin.getCurrentTwitterUser();

关于ios - 在Flutter应用中使用Firebase进行社交登录(Google,Facebook,Apple登录)是否是强制性的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62186326/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com