Skip to content

Commit

Permalink
docs(ui_oauth_apple): add platform support note (#139)
Browse files Browse the repository at this point in the history
* docs(ui_oauth_apple): add platform support note

* Update packages/firebase_ui_oauth_apple/lib/src/provider.dart

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>

---------

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
  • Loading branch information
lesnitsky and russellwheatley committed Oct 12, 2023
1 parent bcfa2be commit 88b85b8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/firebase_ui_oauth_apple/lib/src/provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@ import 'package:firebase_ui_oauth/firebase_ui_oauth.dart';

import 'theme.dart';

/// A Firebase UI Auth provider which should be used to add Apple Sign In
/// to your app.
///
/// It is recommended to check if the current platform supports Apple Sign In.
/// This could be achieved with `device_info_plus` package.
///
/// ```dart
/// import 'package:firebase_ui_auth/firebase_ui_auth.dart';
/// import 'package:device_info_plus/device_info_plus.dart';
///
/// Future<void> main() async {
/// WidgetsFlutterBinding.ensureInitialized();
///
/// final deviceInfo = DeviceInfoPlugin();
/// final iosInfo = await deviceInfo.iosInfo;
///
/// FirebaseUIAuth.configureProviders([
/// if ((double.tryParse(iosInfo.systemVersion) ?? 0) >= 13) AppleProvider(),
/// ]);
///
/// runApp(MyApp());
/// }
class AppleProvider extends OAuthProvider {
@override
final providerId = 'apple.com';
Expand Down

0 comments on commit 88b85b8

Please sign in to comment.