Skip to content

Twitter callback URL settings #22

Open

Description

@brandiw

I'm trying to follow this tutorial. I'm 90% of the way there, but having trouble with the callback URL. Can I inquire as to what settings are used in this example app for the callback field? In the screenshot it's blank. Also, Twitter callback is a GET and I don't see any GET routes in this app that you'd be using for this?

For reference, I'm running the front and back ends of this app on two separate ports, and I see some other users are having issues with that. Unsure if related, but I'm also not able to trigger onSuccess in my front end.

Activity

  1. ivanvs commented on May 17, 2018

    @ivanvs
    Contributor

    Hi @brandiw,

    First of all, sorry for late response. I will check out your issue during the weekend. Twitter must have changed something in their API. As soon as I found out what is the issue, I will edit the tutorial and post here solution.

  2. pthieu commented on Jun 28, 2018

    @pthieu

    @brandiw @ivanvs:

    Twitter has changed their flow it seems.

    The popup() will get the login form from Twitter which hits their /authorize endpoint:

    <form action="https://api.twitter.com/oauth/authorize" id="oauth_form" method="post" target="_self">
    ...
    </form>
    

    Upon successful login, they will handle some logic and redirect the user to the Callback URL that the app owner specified in the app settings.

    This means the solution without changing the component logic is to add another route route.get('<Callback URL you specified in settings>'), which will either return something or redirect back to a route that has the query parameters oauth_token and oauth_verifier, since the component is polling for these here: https://github.com/GenFirst/react-twitter-auth/blob/master/src/index.js#L72

    The polling logic will will detect these query parameters and close the dialog, returning them to the next middleware that's set up.

  3. ragrag commented on Oct 20, 2019

    @ragrag

    @brandiw Did you manage to get it working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions