sign_in_with_apple 2.0.0+1 copy "sign_in_with_apple: ^2.0.0+1" to clipboard
sign_in_with_apple: ^2.0.0+1 copied to clipboard

outdated

Flutter bridge to initiate Sign in with Apple (currently iOS and macOS only). Includes support for keychain entries as well as signing in with an Apple ID.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:sign_in_with_apple/sign_in_with_apple.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Example app: Sign in with Apple'),
        ),
        body: Container(
          padding: EdgeInsets.all(10),
          child: Center(
            child: SignInWithAppleButton(
              onPressed: () async {
                final credentials = await SignInWithApple.getAppleIDCredential(
                  scopes: [
                    AppleIDAuthorizationScopes.email,
                    AppleIDAuthorizationScopes.fullName,
                  ],
                );

                print(credentials);

                // send credentials (especially `credentials.authorizationCode`) to your server to create a session
                // after they have been validated with Apple
              },
            ),
          ),
        ),
      ),
    );
  }
}
1921
likes
0
pub points
100%
popularity

Publisher

verified publisheraboutyou.com

Flutter bridge to initiate Sign in with Apple (currently iOS and macOS only). Includes support for keychain entries as well as signing in with an Apple ID.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, meta

More

Packages that depend on sign_in_with_apple