Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to twitter oauth2.0 [fixes the previous merge conflict] #75

Closed
wants to merge 12 commits into from

Conversation

Shubhcoder
Copy link
Contributor

@Shubhcoder Shubhcoder commented Jul 8, 2022

Fixes the issue #45

Detailed overview of the changes being made:-

  • publisher/twitter/oauth2/ --> The files inside this are handling all the oauth2 flow related stuffs.
    Like authorizing app, authenticating requests, regenerating tokens, etc. Using the package, golang.org/x/oauth2.

  • publisher/twitter/publisher.go --> Removed dependency of dghubble/oauth1, dghubble/twitter package and added our own inbuilt oauth2 handler for twitter.
    Also, changed the working of the function to monitor tweets for exceeding length(to help in testing).

  • publisher/twitter/publisher_test.go --> Commented two test functions for now. As, they are using empty/invalid id and secret for generating config that will result into failed authentication. Have to think for other work around.

  • PublishersAndProviders.md --> Added steps to generate twitter client id and secret.

  • README.md --> Added the information for authorization steps that the user needs to perform while running the bot.

  • img/ --> New folder, it contains images to help visualize the above steps for better understanding and assistance.

  • cmd/larry/main.go --> Changes to integrate with the updated authorization flow.

  • publisher/twitter/oauth2/test_files --> This folder contains file required while testing oauth2 package.

  • docker-compose.yml --> Removed the variables which are not required anymore.

cc: @ezeoleaf

@Shubhcoder Shubhcoder closed this Jan 23, 2023
@Shubhcoder Shubhcoder deleted the oauth2 branch January 23, 2023 08:44
@Shubhcoder Shubhcoder restored the oauth2 branch January 23, 2023 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant