parse-community / Parse-SDK-Flutter

The Dart/Flutter SDK for Parse Platform
https://parseplatform.org
Apache License 2.0
575 stars 190 forks source link

Support Facebook Limited Login #1003

Open thphuccoder opened 2 months ago

thphuccoder commented 2 months ago

New Feature / Enhancement Checklist

Current Limitation

Facebook Login does not support Facebook Limited

Feature / Enhancement Description

When calling loginWith() method to login with facebook, we can pass below built-in facebook (a map):

Map<String, dynamic> facebook(String token, String id, DateTime expires) {
  return <String, dynamic>{
    'access_token': token,
    'id': id,
    'expiration_date': expires.toString()
  };
}

Facebook now have another Facebook Limited version, which is described here: https://docs.parseplatform.org/parse-server/guide/#facebook-authdata

Alternatives / Workarounds

We may be able to pass a map directly to login with Facebook Limited:

ParseUser.loginWith(
            'facebook',
            {
                "id": "user's Facebook id number as a string",
                "token": "a JWT token from Facebook SDK limited login"
            }
);
parse-github-assistant[bot] commented 2 months ago

Thanks for opening this issue!