Support OAuth2 Account Integration - #33
Conversation
|
Hello, I wanted to write an issue but maybe this pull request will resolve the problem. I'm just wondering if this PR is related to the " {'message': 'This video requires login.', 'severity': 'common', 'cause': 'com.sedmelluq.discord.lavaplayer.tools.FriendlyException: This video requires login.'} " error. Thanks for your answer. |
|
It should, as well as |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
119711e to
9e234eb
Compare
|
Just tested this PR, seems to fix "sign in to confirm you are not a robot" on a Hetzner node and the 403 errors I was getting on my locally hosted node. I don't even have to have IPv6 rotation on. Thank you for this, you are genuinely a lifesaver. I was having so much trouble with the 403 errors. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
|
It seems that the issue with using IPv6 on Hetzner was only temporarily resolved. After using it with 30-50 players for 10 days, the problem 'Your limits will reset soon, usually within an hour.' followed." |
Change your dependency to look like this: Add this line to your youtube config: Launch Lavalink like normal and look at it's logs. Further instruction will be there. For now, this works very well and solved all the problems I had with authorization errors. However, it is a very bare bones addition. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
9e234eb to
6171f77
Compare
6171f77 to
6af80f4
Compare
e622016 to
287bcc5
Compare
This PR implements support for linking accounts via OAuth2.
By acting as a TV client, we can request users input a code into the official device linking webpage which grants us an access token and a refresh token, which with the former, can be dispatched with requests effectively serving as a replacement to the original source manager's account authentication system. The entire process is done without any external hosted services so security is vastly improved, and this relies on the OAuth flow provided by YT/Google.
The downside to this system is it requires users to keep track of refresh tokens, or authorize youtube-source on every launch.
There are facilities provided to fetch and set refresh tokens to allow for some form of persistence.
This PR requires a few finer details to be worked out, notably:
The basic functionality of this PR has been tested, and account authentication does work, with authorization headers being appended onto relevant requests. Testing has not been done to ensure the success of token refreshing as of yet. I also cannot confirm whether providing authentication alleviates any current issues such as "Sign in to confirm you're not a bot" or accessing age restricted videos that the embedded TV client does not provide access to.
A big, or rather, VERY BIG disclaimer to this PR is to use with caution. DO NOT use your main account(s).