flutter_social_auth 1.0.3 copy "flutter_social_auth: ^1.0.3" to clipboard
flutter_social_auth: ^1.0.3 copied to clipboard

Flutter package for login with social accounts like google, facebook, apple

1.0.3 #

Flutter package for login with social accounts like google, facebook, apple

Getting started #

Follow the instructions: google_sign_in here.
flutter_facebook_auth here.
sign_in_with_apple here.

Example #

import 'package:flutter/material.dart';
import 'package:flutter_social_auth/flutter_social_auth.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  String _makeSendEmailCode(String email){
    return 'https://flutter/$email';
  }

  String _makeUrlVerifyCode(String email, String code){
    return 'https://flutter/$email/$code';
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: AuthView(
        listTypeLogin: const [TypeLogin.google, TypeLogin.apple],
        hideLoginWith: true,
        onLogin: (userAuthInfo) {
          if (userAuthInfo != null) {
            print(userAuthInfo);
          }
        },
        makeUrlSendEmailCode: _makeSendEmailCode,
        makeUrlVerifyCode: _makeUrlVerifyCode,
        onSendEmailVerifyCode: (result, email) {
          if (result) {
            print(email);
          }
        },
        onVerifyCode: (verifyCodeStatus) {
          print(verifyCodeStatus.name);
        },
      ),
    );
  }
}
0
likes
110
pub points
0%
popularity

Publisher

unverified uploader

Flutter package for login with social accounts like google, facebook, apple

Homepage

Documentation

API reference

License

unknown (LICENSE)

Dependencies

crypto, flutter, flutter_facebook_auth, google_sign_in, http, sign_in_with_apple

More

Packages that depend on flutter_social_auth