react-native-oauth icon indicating copy to clipboard operation
react-native-oauth copied to clipboard

affter twitter account login there is no call back for the authorize get trigger

Open kathyLA opened this issue 8 years ago • 18 comments

Hi ,

Thanks for the nice work , but I double check many steps for the library set up for ios. Once i sign in from the twitter I am able to direct back to app. but the response call back never get trigger.

kathyLA avatar Apr 17 '17 18:04 kathyLA

Same issue here.

bakr-baroudi avatar Apr 18 '17 02:04 bakr-baroudi

First of all, thank you very much for making my life a bit easier. I am using react-native version 0.43.3 and currently experiencing the same issue for both Twitter and Facebook. I have tested Google but I imagine it would be the same thing. Steps to reproduce:

  1. click on Twitter sign in
  2. gets redirected to twitter to sign in
  3. sign in
  4. gets asked by Twitter to "Open this page in <AppName>?"
  5. Click on "Open" re-opens the app but DOES NOT trigger the response callback as expected. 20170421_oauth_twitter_error

Thanks in advance for any help.

michellenguyen avatar Apr 21 '17 18:04 michellenguyen

Same here, both facebook and twitter callbacks does not trigger. RN 0.43.3 IOS 10.3

batuypn avatar Apr 26 '17 08:04 batuypn

Same here, twitter callback on iOS does not trigger. It works perfectly on Android. I don't have any problem with facebook. It works just fine.

vanydeasy avatar Apr 29 '17 07:04 vanydeasy

Please, can anybody help us? same problem here!

shuffledex avatar May 07 '17 22:05 shuffledex

I solved my problem, I debugged IOS code and saw that there were two duplicated methods and login callback was returning to wrong method in my AppDelegate.m. Here is my working method in AppDelegate.m:

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
  if ([url.absoluteString containsString:@"twitter"]){
    return [OAuthManager handleOpenUrl:application
                               openURL:url
                     sourceApplication:@"twitter"
                            annotation:nil];
  } else{
    // other callbacks ...
    return NO;
  }
}

batuypn avatar May 10 '17 08:05 batuypn

Stop unsubscribe On Wed, May 10, 2017 at 3:21 AM Batuhan Yapanoglu [email protected] wrote:

I solved my problem, I debugged IOS code and saw that there were two duplicated methods and login callback was returning to wrong method in my AppDelegate.m. Here is my working method in AppDelegate.m:

  • (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options { if ([url.absoluteString containsString:@"twitter"]){ return [OAuthManager handleOpenUrl:application openURL:url sourceApplication:@"twitter" annotation:nil]; } else{ // other callbacks ... return NO; } }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fullstackreact/react-native-oauth/issues/107#issuecomment-300410695, or mute the thread https://github.com/notifications/unsubscribe-auth/AZmjSDDLETkXTwLFeLdO5YUHEcIuL7W1ks5r4XN0gaJpZM4M_Zu_ .

dowdmatthew88 avatar May 10 '17 14:05 dowdmatthew88

I'm having this issue as well. I tried the solution @batuypn suggested but it's still not working

mradzwilla avatar May 15 '17 03:05 mradzwilla

same issue

beeant avatar May 15 '17 20:05 beeant

Same here. @batuypn 's solution didn't help me as well.

novakben avatar Jun 28 '17 10:06 novakben

I switched to https://github.com/tipsi/tipsi-twitter for twitter auth

beeant avatar Jul 02 '17 07:07 beeant

I'm having this problem as well. Facebook auth works fine so I have to think that I generally set everything up okay. I am able to link to the Twitter website, authorize, and redirect back to the app, but it fails without any feedback once I get back. Tried some of the solutions offered but nothing so far. Help is appreciated.

iOS log if helpful:

TestAppMobile[8364] <Notice>: calling signInTwitter
TestAppMobile[8364] <Warning>: Calling authorizeWithUrl: twitter with callbackURL: MyTestApp://oauth-response/twitter
	 {
	    "access_token_url" = "https://api.twitter.com/oauth/access_token";
	    "api_url" = "https://api.twitter.com";
	    "app_name" = MyTestApp;
	    "auth_version" = "1.0";
	    "authorize_url" = "https://api.twitter.com/oauth/authorize";
	    "callback_url" = "MyTestApp://oauth-response/twitter";
	    "consumer_key" = <redacted>;
	    "consumer_secret" = <redacted>;
	    "request_token_url" = "https://api.twitter.com/oauth/request_token";
	}
TestAppMobile[8364] <Notice>: 'app state changed', 'inactive'
# Not sure what is noise here, probably most of it
assertiond[995] <Error>: assertion failed: 16E195 14E8301: assertiond + 34783 [E94C8872-C891-3467-AE1B-FE2DEB8428F5]: 0x1
Unknown[995] <Error>: 
assertiond[995] <Error>: assertion failed: 16E195 14E8301: assertiond + 117488 [E94C8872-C891-3467-AE1B-FE2DEB8428F5]: 0x1
Unknown[995] <Error>: 
diagnosticd[1003] <Notice>: unsupported XPC object: OS_xpc_dictionary
assertiond[995] <Warning>: client <BSProcessHandle: 0x7feaebe047f0; TestAppMobile:8364; valid: YES> HWM increased to 2 because of <BKProcessAssertion: 0x7feaebc1e8e0; "com.apple.asset_manager.cache_resource_cleanup" (finishTask:180s); id:…85D515A8200B>
TestAppMobile[8364] <Notice>: 'app state changed', 'background'
com.apple.CoreSimulator.SimDevice.58C25278-A35D-4DB7-B914-4DBD26D0BB2E.launchd_sim[972] (com.apple.imfoundation.IMRemoteURLConnectionAgent) <Warning>: Unknown key for integer: _DirtyJetsamMemoryLimit
com.apple.WebKit.WebContent[8680] <Error>: objc[8680]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x11cd6dcc0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x11cb846f0). One of the two will be used. Which one is undefined.
videosubscriptionsd[8681] <Warning>: Entering main() for videosubscriptionsd.
videosubscriptionsd[8681] <Warning>: Unable to find framework using path: /System/Library/Frameworks/VideoSubscriberAccount.framework
com.apple.CoreSimulator.SimDevice.58C25278-A35D-4DB7-B914-4DBD26D0BB2E.launchd_sim[972] (com.apple.videosubscriptionsd[8681]) <Warning>: Service exited with abnormal code: 1
com.apple.CoreSimulator.SimDevice.58C25278-A35D-4DB7-B914-4DBD26D0BB2E.launchd_sim[972] (com.apple.videosubscriptionsd) <Notice>: Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
# These popped up after switching back into the app
assertiond[995] <Error>: assertion failed: 16E195 14E8301: assertiond + 117488 [E94C8872-C891-3467-AE1B-FE2DEB8428F5]: 0x1
Unknown[995] <Error>: 
assertiond[995] <Error>: assertion failed: 16E195 14E8301: assertiond + 34783 [E94C8872-C891-3467-AE1B-FE2DEB8428F5]: 0x1
Unknown[995] <Error>: 
TestAppMobile[8364] <Notice>: 'app state changed', 'active'

BrendanBerkley avatar Jul 13 '17 02:07 BrendanBerkley

Please help, same problem here !

jorge627 avatar Jul 14 '17 02:07 jorge627

Did anyone figure this out? I'm having the same issue.

arminsal1 avatar Jul 21 '17 19:07 arminsal1

This is happen to me after change the Signing team :(

LeonidasEsteban avatar Aug 11 '17 17:08 LeonidasEsteban

Also having this issue

mackenziemance avatar Aug 17 '17 22:08 mackenziemance

@BrendanBerkley This is probably months too late, but by debugging into objectiveC I found that the scheme has to be all lowercase. So in your

TestAppMobile[8364] <Warning>: Calling authorizeWithUrl: twitter with callbackURL: MyTestApp://oauth-response/twitter
	 {
	    "access_token_url" = "https://api.twitter.com/oauth/access_token";
	    "api_url" = "https://api.twitter.com";
	    "app_name" = MyTestApp;
	    "auth_version" = "1.0";
	    "authorize_url" = "https://api.twitter.com/oauth/authorize";
	    "callback_url" = "MyTestApp://oauth-response/twitter";
	    "consumer_key" = <redacted>;
	    "consumer_secret" = <redacted>;
	    "request_token_url" = "https://api.twitter.com/oauth/request_token";
	}

The callback_url can not be "MyTestApp://oauth-response/twitter" it would have to be "mytestapp://oauth-response/twitter".

If you don't have the "URL scheme" in all lowercase it will fail silently.

SailingSteve avatar Sep 23 '17 00:09 SailingSteve

@beeant I am not getting any response after connecting my app to twitter account.

bisht2ankit avatar Oct 31 '17 19:10 bisht2ankit