djangoflow_auth_facebook 0.0.4+12 djangoflow_auth_facebook: ^0.0.4+12 copied to clipboard
djangoflow_auth_facebook adds a touch of Facebook magic to your Flutter app with Djangoflow API
🌟 DjangoFlow Auth Facebook Flutter Package 🌟
djangoflow_auth_facebook adds a touch of Facebook magic to your Flutter app! Seamlessly integrate Facebook authentication functionalities into the DjangoFlow framework. Effortlessly handle Facebook login with customizable permissions and login behavior. It's as easy as 1-2-3! 🔐📱
Experience the ease of Facebook integration with djangoflow_auth_facebook, and let your app shine with social login power!
Features #
- Smooth integration with the DjangoFlow framework.
- Facebook Login using the
flutter_facebook_auth
package. - Customizable permissions to access user data (default: ['email', 'public_profile']).
- Flexible login behavior options (default: nativeWithFallback).
- Enjoy a clean and consistent API through the
FacebookSocialLogin
class.
Installation #
Add the djangoflow_auth_facebook
package to your pubspec.yaml
file:
dependencies:
djangoflow_auth_facebook: <latest_version>
flutter_facebook_auth: <latest_version> # Check for the latest version
Run flutter pub get
to fetch the package.
Note: Follow flutter_facebook_auth package for platform related configuration.
Usage #
To use the FacebookSocialLogin
for Facebook authentication, follow these steps:
- Import the necessary packages:
import 'package:djangoflow_auth/djangoflow_auth.dart';
import 'package:djangoflow_auth_facebook/djangoflow_auth_facebook.dart';
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
- Initialize
FacebookSocialLogin
and provide the desired permissions and login behavior:
final facebookLogin = FacebookSocialLogin(
permissions: ['email', 'public_profile'],
loginBehavior: LoginBehavior.nativeWithFallback,
type: SocialLoginType.fromProvider(ProviderEnum.facebook),
);
- Perform the Facebook login:
final result = await facebookLogin.login();
// Handle the login result, e.g., extract the access token
if (result != null && result.status == LoginStatus.success) {
final accessToken = result.accessToken;
// Proceed with authentication or user data retrieval
} else {
// Handle login failure
}
- Logout when needed:
await facebookLogin.logout();
Read more here for detailed example on how to use it with djangoflow_auth
this: https://pub.dev/packages/djangoflow_auth#setting-up-authcubit
Example #
Contributions and Issues #
Contributions, bug reports, and feature requests are welcome! Feel free to submit a pull request or open an issue on the GitHub repository.
License #
This package is distributed under the MIT License.