darwin-morocho / flutter-facebook-auth

A flutter plugin to add login with facebook in your flutter app
193 stars 127 forks source link

permission decline not work currently #329

Closed herehere closed 1 year ago

herehere commented 1 year ago

What version are you using?

flutter_facebook_auth: 5.0.7

What OS and version are you using to local deploy your application?

iOS 16.3, android 11

What platforms are you seeing the problem on?

Android, iOS

pubspec.yaml

environment:
  sdk: ">=2.7.0 <3.0.0"
  flutter: ">=1.20.0 <2.0.0"

dependencies:
  flutter:
    sdk: flutter
  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.3
  #intl: ^0.16.0
  intl: ^0.17.0
  #crypto: ^2.0.6
  crypto: ^3.0.1
  #rxdart: ^0.24.1
  rxdart: ^0.26.0
  #redux_epics: ^0.14.0
  redux_epics: ^0.15.0
  #json_annotation: ^2.0.0
  json_annotation: ^4.3.0
  json_sorter: ^1.0.0
  flutter_localizations:
    sdk: flutter
  #flutter_redux: ^0.6.0
  flutter_redux: ^0.8.2
  #path: ^1.7.0
  path: ^1.8.0
  #bson: ^0.3.2
  bson: ^1.0.4
  #http: ^0.12.2
  http: ^0.13.4
  #http_client_helper: ^0.2.1
  http_client_helper: ^2.0.2
  #####screen: ^0.0.4
  screen: ^0.0.5
  bitsdojo_window: ^0.1.1+1
  #archive: ^2.0.11
  archive: ^3.1.6
  sembast: '<=1.17.1'
  transparent_image: ^0.1.0
  #####flutter_colorpicker: ^0.3.4
  flutter_colorpicker: ^0.6.0
  #package_info: ^0.4.3+2
  package_info_plus: 1.3.0
  #path_provider: ^1.5.0
  path_provider: ^2.0.6
  #####fluttertoast: ^7.0.2
  fluttertoast: ^8.0.8
  bot_toast: ^4.0.1
  #####share: ^0.6.5+4
  share: ^2.0.4
  share_plus: ^4.0.4
  #shared_preferences: ^0.5.12+4
  shared_preferences: ^2.0.8
  #####auto_size_text: ^2.1.0
  auto_size_text: ^3.0.0
  validators: ^2.0.0
  #quiver: ^2.0.5
  quiver: ^3.0.1
  #connectivity: ^2.0.2
  connectivity_plus: ^2.0.2
  #file_picker: ^2.1.7
  file_picker: ^4.4.0
  file_selector_platform_interface: ^2.0.2
  file_selector_windows: ^0.0.2+1
  #socket_io_client: ^0.9.11
  socket_io_client: ^1.0.2
  #####url_launcher: ^5.0.2
  url_launcher: ^6.0.12
  open_appstore: ^1.0.2
  #redux_logging: ^0.4.0
  redux_logging: ^0.5.0
  #permission_handler: ^5.0.1+1
  permission_handler: ^8.3.0
  #keyboard_visibility: ^0.5.6
  flutter_keyboard_visibility: ^5.1.0
  #####qr_code_scanner: ^0.0.13
  qr_code_scanner: ^0.6.0
  #####mime: ^0.9.7
  mime: ^1.0.1
  #image_picker: ^0.6.7+21
  image_picker: ^0.8.5+3
  images_picker: ^1.2.11
  disk_space: ^0.0.3
  googleapis: any
  googleapis_auth: any
  #google_sign_in: 4.0.11
  ##google_sign_in: ^4.5.9
  google_sign_in: ^5.1.1
  #flutter_facebook_login: ^3.0.0
  flutter_facebook_auth: ^5.0.7
  # flutter_native_timezone: ^1.0.4
  #device_info: 1.0.0
  device_info: ^2.0.3
  device_info_plus: ^4.0.0
  network_tools: 1.0.8
  xml: any

dev_dependencies:
  flutter_test:
    sdk: flutter
  #build_runner: ^1.10.0
  build_runner: ^2.1.4
  msix: ^2.6.3
  #webview_flutter: ^0.3.15
  webview_flutter: ^2.1.2
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec

Describe the Bug

we add permissions:[ 'email', 'publish_video', 'pages_show_list', 'pages_read_engagement', 'pages_manage_posts', 'public_profile', 'publish_to_groups', ] likes: Screenshot_20230207-114714_Facebook

This code work fine about 11/30/2022, but current can not work & will cause FB re-view fail.

Expected Behavior

permission should apply to fb's appllication config with all deselected.

But i got this failed situation: 螢幕擷取畫面 2023-02-07 114429

To Reproduce

  1. when login action triggered, we deselect all added permissions, and success login.
  2. after that checkout the application status on FB will see that config not matched.

Relevant log output

No response

flutter doctor -v

[√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.19043.1889], locale zh-TW)
    • Flutter version 2.5.3 at D:\Sdks\flutter\flutterStable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (1 year, 4 months ago), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart version 2.14.4

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at D:\Sdks\Android\Sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = D:\Sdks\Android\Sdk
    • ANDROID_SDK_ROOT = D:\Sdks\Android\Sdk
    • Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.4)
    • Visual Studio at D:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.7.30517.126
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2020.3)
    • Android Studio at D:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] Connected device (2 available)
    • SM T720 (mobile)  • R54N600AEDZ • android-arm64 • Android 11 (API 30)
    • Windows (desktop) • windows     • windows-x64   • Microsoft Windows [Version 10.0.19043.1889]

• No issues found!

Info.plist (iOS)

No response

Podfile (iOS)

No response

AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.XXX.XXXX">

    <!-- The INTERNET permission is required for development. Specifically,
         flutter needs it to communicate with the running application
         to allow setting breakpoints, to provide hot reload, etc.
    -->
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <!--
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
        tools:ignore="ScopedStorage"/>
    -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
        tools:ignore="ScopedStorage" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />

    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
         calls FlutterMain.startInitialization(this); in its onCreate method.
         In most cases you can leave this as-is, but you if you want to provide
         additional functionality it is fine to subclass or reimplement
         FlutterApplication and put your custom class here. -->
    <application
        android:requestLegacyExternalStorage="true"
        android:label="XXX"
        android:icon="@mipmap/ic_launcher"
        android:usesCleartextTraffic="true">
        <activity
            android:name=".MainActivity"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize"
            android:exported="true">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <!-- Displays an Android View that continues showing the launch screen
                 Drawable until Flutter paints its first frame, then this splash
                 screen fades out. A splash screen is useful to avoid any visual
                 gap between the end of Android's launch screen and the painting of
                 Flutter's first frame. -->
            <meta-data
              android:name="io.flutter.embedding.android.SplashScreenDrawable"
              android:resource="@drawable/launch_background"
              />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <activity android:name="com.facebook.FacebookActivity"
            android:configChanges=
                "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name" />
        <activity
            android:name="com.facebook.CustomTabActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="@string/fb_login_protocol_scheme" />
            </intent-filter>
        </activity>

        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
        <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
        <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/>
    </application>
    <queries>
        <provider android:authorities="com.facebook.katana.provider.PlatformProvider" />
    </queries>
    <!-- Some Chromebooks don't support touch. Although not essential,
     it's a good idea to explicitly include this declaration. -->
    <uses-feature android:name="android.hardware.touchscreen"
        android:required="false" />
</manifest>

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response

darwin-morocho commented 1 year ago

@herehere this is not an issue of this plugin. Please go to the Facebook developers documentation and check the permissions section