Glimesh / glimesh.tv

Glimesh is a next generation live streaming platform built by the community, for the community.
https://glimesh.tv
Other
461 stars 77 forks source link

Only call Twitter API when necessary #904

Closed MemoryLeakDeath closed 1 year ago

MemoryLeakDeath commented 1 year ago

fixes #634

Currently we are calling the Twitter API on each settings page load unnecessarily. I've removed the calls to the api and consolidated it to a new endpoint on the UserSocialController -- "/users/social/twitter/connect".

The new endpoint will do the Twitter authorization_url lookup and, if successful, do the redirect to Twitter that the "Connect with Twitter" button on the user profile page would have done. If we are not successful in contacting the Twitter API, the endpoint will redirect the user back to the user profile page with an error message:

image

NOTE: I am awaiting access from Twitter to their API, so I am only able to test the error path and not the successful path at this time.

There should be no other changes to the Twitter auth flow as a result of this change.

clone1018 commented 1 year ago

Merged in https://github.com/Glimesh/glimesh.tv/commit/55812ed021b6b20c99950e7770705763cceb44c5