Sign a user with Twitter

Since Expo SDK does support only authentication with Facebook, Twitter authentication must be handled manually.

I followed this example and it looks promising, the only issue is that the callback URL specified in the backend end code which is:

const callbackURL = 'exp://xe-rh9.janic.twitter-login.exp.direct:80+/redirect';

Must be entered in the app dashboard in twitter developer console, and when entered it shows invalid url (See the attached photo).

Hey there,

It looks like the example code you linked to is very old (SDK 14!) and won’t work any more. We’ll try to update this when we get a chance, thank you for bringing that to our attention.

For now, you can use more recent Expo Apis and follow the same general idea as that example code–

There is a pull request in that example that solved my problem.

In addition to this, I was instructed by twitter support team to type only the scheme (which is exp://) in the callback url field in the twitter app settings instead of the entire callback url to my app and everything should work perfectly.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.