roughike / flutter_facebook_login

A Flutter plugin for allowing users to authenticate with native Android & iOS Facebook login SDKs.
BSD 2-Clause "Simplified" License
405 stars 331 forks source link

Is this now being deprecated ? #231

Open sallymariehollywood opened 4 years ago

sallymariehollywood commented 4 years ago

Please can you confirm the status of this project/plugin

Reflectly uses this but it seems that they are dropping support for FACEBOOK authentication and consequently this plugin.

image

adar2378 commented 4 years ago

What :o

giacomomasseron commented 4 years ago

Any news?

Or in case do you know an alternative?

juliengit2 commented 4 years ago

same issue for us, any news ?

adar2378 commented 4 years ago

I have updated the version to the latest one and compiled again, for ios updated the pod file using pod update

MsXam commented 4 years ago

Updating POD and Version isnt the issue - the problem is that this plugin uses an an obsolete UIWebView within iOS SDK. Submitting any app now to the APPLE APP STORE will get an instant rejection - hence the reason why Reflectly possibly is no longer supporting FaceBook logins. BTW - This plugin was written by Iiro Krankka who , works for Reflectly ....

giacomomasseron commented 4 years ago

@MsXam you know an alternative or howto develope facebook login without a plugin?

MsXam commented 4 years ago

@GiacomoK You do not need this plugin to authenticate facebook but the facebook client side sdk's make the job easier. Now that the developers of Reflectly are abandoning their support for facebook with this plugin (because their plugin using obsolete SDK's which are prohibited now during app-store submissions) - one can implement a unified login that does the same outside the client side sdk's - You can use server side code to accomplish the same thing which is browser based and implement a web-flow login. I'm moving towards this approach now.

adar2378 commented 4 years ago

@MsXam Hi, could you help me with this idea of doing it from the server-side?

Eddayy commented 4 years ago

has anyone tried this solution? https://github.com/roughike/flutter_facebook_login/issues/209#issuecomment-563231679

EmmanuelAmodu commented 4 years ago

@MsXam I have implemented web-view flow, in flutter and nodeJS if you are interested or anyone is, in the sample code, or probably converting to a plugin or something.

EmmanuelAmodu commented 4 years ago

This should help,

  Future<void> _loginWithFacebook() async {
    Map<String, dynamic> result = await Navigator.push(
      context,
      MaterialPageRoute(builder: (context) => 
        CustomWebView(
          title: 'Facebook Login',
          selectedUrl: 'https://www.facebook.com/dialog/oauth?client_id=$your_cliend_id&redirect_uri=$your_redirect_url=email,public_profile',
        ), 
        maintainState: true
      ),
    );

    if (result != null && result["authToken"] != null) {
      _sendTokenToServer(
        user: result,
        authProvider: AuthProvider.Facebook
      );
    } else {
      _showErrorOnUI(result != null ? 'Login error, this is our fault': 'You must be logged in to continue');
    }
  }

CustomWebView.dart


import 'dart:async';
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

import 'package:webview_flutter/webview_flutter.dart';

class CustomWebView extends StatelessWidget { final String title; final String selectedUrl;

final Completer _controller = Completer();

CustomWebView({ @required this.title, @required this.selectedUrl, });

@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( backgroundColor: Colors.transparent, ), body: WebView( initialUrl: selectedUrl, javascriptMode: JavascriptMode.unrestricted, javascriptChannels: [ JavascriptChannel(name: 'Print', onMessageReceived: (msg) { Map token = json.decode(msg.message); Navigator.pop(context, token); }), ].toSet(), gestureRecognizers: Set() ..add(Factory( () => VerticalDragGestureRecognizer()) ), onWebViewCreated: (WebViewController webViewController) { _controller.complete(webViewController); }, ) ); } }



You can use this this way rather than this plugin as it is safe to assume it is no longer maintained.
bpaul7101 commented 4 years ago

@EmmanuelAmodu

Can you kindly expand on your solution with respect :

_sendTokenToServer(

And also your nodejs just for completeness as I think this could be a great solution now that this facebook plugin is no longer being maintained.

EmmanuelAmodu commented 4 years ago

@bpaul7101 check it out here, I am working this. I have completed the mobile section, I would do the nodejs later

kittaneh commented 4 years ago

Hello, How about using the new branch:

dependencies:
  flutter_facebook_login:
    git:
      url: https://github.com/roughike/flutter_facebook_login.git
      ref: update-to-latest-fbsdk
kareldebedts commented 4 years ago

https://medium.com/@karlwhiteprivate/flutter-facebook-sign-in-with-firebase-in-2020-66556a8c3586

damv93 commented 4 years ago

@EmmanuelAmodu can you please show how to log out?

Dhuliang commented 4 years ago

Hi , anyone working on this?

awhitford commented 4 years ago

@Dhuliang Honestly, I've given up on this library and instead followed the instructions from the article @kareldebedts mentioned: https://medium.com/@karlwhiteprivate/flutter-facebook-sign-in-with-firebase-in-2020-66556a8c3586 It was not too challenging and I didn't need to worry about deprecated libraries. And I ended up having to do the same thing with Twitter too.

vixez commented 4 years ago

I did the same as @awhitford, it was barely any work to change to that library.

adgrover commented 3 years ago

there is a new plugin on pub dev. Visit https://pub.dev/packages/flutter_facebook_auth. It resolves the UIWebView issue.