0maru / twitter_login

MIT License
54 stars 54 forks source link

After login twitter account from browser then get stuck to return to my app #109

Closed dqcuong2 closed 1 year ago

dqcuong2 commented 2 years ago

Screenshot_1657793151

dqcuong2 commented 2 years ago

@0maru Please help

han-tm commented 2 years ago

Same problem. I can't solve this problem for 2 weeks now.

My code in AndroidManifest

 <intent-filter>
            <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
                    <data android:scheme="twitter-audioRoulette-auth"/>
   </intent-filter>

My login settings:

 final twitterLogin = TwitterLogin(
      apiKey: 'xxxxxx',
      apiSecretKey: 'xxxx',
      redirectURI: 'twitter-audioRoulette-auth://',
    );
Androidsignal commented 2 years ago

Also i am faceting same issue. Any solution ?

My AndroidManifest Code

here i'm using multiple and this for twitter.

 <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:host="twoitwoi.com"
                        android:scheme="test" />
 </intent-filter>

Login code:

final twitterLogin = TwitterLogin(
          apiKey: dotenv.env['TWITTER_API_key'].toString(),
          apiSecretKey: dotenv.env['TWITTER_API_SECRET_key'].toString(),
          redirectURI: "test://twoitwoi.com",
        );
0maru commented 2 years ago

Please check to see if deeplink is functioning by using the adb command. If the configuration is correct, the application will start.

adb shell am start -W -a android.intent.action.VIEW -d <deeplink url> <your app name>

for example

adb shell am start -W -a android.intent.action.VIEW -d "test://twoitwoi.com" com.flutter.sample.app
Androidsignal commented 2 years ago

image

@0maru But slil not getting any response.

https://user-images.githubusercontent.com/30517653/179461247-d94ce520-2d72-422f-8f9f-c5251649a81f.mov

0maru commented 2 years ago

@Androidsignal Are you registering test:// as a Callback URI / Redirect URL in the Twitter Developer portal?

bulgarian-beast commented 2 years ago

Same problem, and I have verify that I have added the callback url in twitter developer portal @0maru

KuldeepVagadiya commented 2 years ago

Hello @0maru any update on this I have same problem, please update us on this, Thanks!

@bulgarian-beast are you find any solution this also , please update Thanks!

0maru commented 2 years ago

@KuldeepVagadiya @bulgarian-beast Clone the twitter_login repository and verify that the example project works. If the sample does not work, the minimum reproducible code sample and procedure that will cause this error.

KammererTob commented 2 years ago

I had the same issue. Changing the callback to just "twitter://" worked for me. Not sure if it is the specific name or just that it doesn't work with any special characters like "-" or "." in the scheme... So:

<data android:scheme="twitter"/> in the AndroidManifest.xml and redirectURI: 'twitter://', in the TwitterLogin constructor

tobi-ayeni commented 2 years ago

Make the host empty or better still remove the host

LoadJulz commented 1 year ago

Did anyone solve the issue? iOS everything works fine but for Android I stuck on the callback screen

0maru commented 1 year ago

Close Issue. If a similar error occurs, reopen the issue.