我正试图实现一个社会登录在flutter应用程序和我不想使用Firebase,我已经探索了在谷歌和开发论坛所有大多建议Firebase相同。我任何一个人可以帮助我,这将是更好的,如果一个人可以建议pluginplugins的社会登录主要在谷歌,Facebook,Twitter和苹果。
快速回答是NO。
Flutter并不是严格意义上的与Firebase绑定,firebase只是一个选择。
有一个飞镖包 https:/pub.devpackagessocial_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();