djangoflow_auth_apple 0.0.2 djangoflow_auth_apple: ^0.0.2 copied to clipboard
djangoflow_auth_apple lets you embrace the magic of Apple Sign-In within your Flutter app!
🌟 DjangoFlow Auth Apple Flutter Package 🌟
djangoflow_auth_apple lets you embrace the magic of Apple Sign-In within your Flutter app! Effortlessly integrate Apple authentication functionalities into the DjangoFlow framework. Enjoy the power of Apple Sign-In with customizable scopes, nonce, and more. It's as smooth as apple butter! 🍏🔐
Unlock the potential of Apple Sign-In integration with djangoflow_auth_apple, and give your users the seamless experience they deserve!
Features #
- Seamless integration with the DjangoFlow framework.
- Apple Sign-In using the
sign_in_with_apple
package. - Customizable scopes to access user data (default: email and full name).
- Support for nonce, web authentication options, and state.
- Convenient API provided through the
AppleSocialLogin
class.
Installation #
Add the djangoflow_auth_apple
package to your pubspec.yaml
file:
dependencies:
djangoflow_auth_apple: <latest_version>
sign_in_with_apple: <latest_version> # Check for the latest version
Run flutter pub get
to fetch the package.
Note: Follow sign_in_with_apple package for platform related configuration.
Usage #
To use the AppleSocialLogin
for Apple Sign-In, follow these steps:
- Import the necessary packages:
import 'package:djangoflow_auth/djangoflow_auth.dart';
import 'package:djangoflow_auth_apple/djangoflow_auth_apple.dart';
import 'package:sign_in_with_apple/sign_in_with_apple.dart';
- Initialize
AppleSocialLogin
and provide the desired scopes, nonce, state, and web authentication options:
final appleLogin = AppleSocialLogin(
scopes: [
AppleIDAuthorizationScopes.email,
AppleIDAuthorizationScopes.fullName,
],
nonce: 'your_nonce_here',
state: 'your_state_here',
webAuthenticationOptions: WebAuthenticationOptions(
// Specify your web authentication options
),
type: SocialLoginType.fromProvider(ProviderEnum.apple),
);
- Perform the Apple Sign-In:
try {
final result = await appleLogin.login();
// Handle the Apple Sign-In result, e.g., extract the user data
if (result != null) {
final appleIDCredential = result;
// Proceed with authentication or user data retrieval
} else {
// Handle login failure
}
} catch (e) {
// Handle exceptions, e.g., Apple login not available on this device
}
Read more here for a detailed example on how to use it with djangoflow_auth
: https://pub.dev/packages/djangoflow_auth#setting-up-authcubit
Example #
An example of using djangoflow_auth_apple
in a Flutter app is coming soon! Stay tuned for a comprehensive usage guide.
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.