Skip to content

auth(tokens, callbackUrl[, options]) not redirecting back to application #14

@KeanuTomatoMomotaro

Description

@KeanuTomatoMomotaro

After the application has opened the browser to authenticate the user, it does not redirect back to the application.

I've unlocked the "lock callback url" settings in the twitter developer apps settings, and supplied these parameters to my manifest:

<application
      android:name=".MainApplication"
      android:allowBackup="true"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data
                android:scheme="appName"
                android:host="main"
            />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
    </application>

Then the method i used to sign in would be:

signInTwitter(){
      var tokens= {
        consumerKey:         'xxx',
        consumerSecret:      'xxx,         
      };

      callbackUrl = 'appName://main'
      
      auth(tokens, callbackUrl)
      .then((credentials) => {
        console.log(credentials)
      }).catch(console.error);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions