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

Hotfix: uses oauth #1669

Closed
wants to merge 1 commit into from
Closed

Conversation

Co11eague
Copy link

@Co11eague Co11eague commented Aug 22, 2024

Quick fix for an issue #1588 that worked for me. Feel free to merge it if it's useful for ya. I suppose if you wanted it be done professional-like you'd add another GUI window for this and explain everything to the user. People running this in their VMs would still need to see the logs anyway to do this. The documentation on the website has to be updated, unless you figure out any other way to do this more efficiently, but I doubt you can as google themselves supply the code and you have to enter it specifically on their website.

In this case I just tailed the logs with:
sudo journalctl -u JMusicBot -n 100

Saw the log:

YoutubeOauth2Handler: !!! DO NOT AUTHORISE WITH YOUR MAIN ACCOUNT, USE A BURNER !!!
YoutubeOauth2Handler: OAUTH INTEGRATION: To give youtube-source access to your account, go to
https://www.google.com/device and enter code XXXXXXXXXX
YoutubeOauth2Handler: !!! DO NOT AUTHORISE WITH YOUR MAIN ACCOUNT, USE A BURNER !!!
YoutubeOauth2Handler: ==================================================

Went to the website, entered the code. The bot now works. I didn't test much, but everything looks fine.

@Co11eague
Copy link
Author

I can take a look a bit more in-depth if you have any suggestions, but I didn't really do this to complete this ticket, this was more for myself, but thought I'd share, maybe somebody finds this helpful as there isn't much documentation on the new lavalink version.

@Co11eague
Copy link
Author

I guess smartest thing would be the bot DMing the owner on discord with the Google code and the link. Makes it simple.

@MichailiK
Copy link
Collaborator

Thanks for the contribution! I just got around to making a more complete implementation in #1670 where OAuth2 is a config option & the refresh token gets automatically saved to a file, so users wont have to go through the login process again, so it's for the best this PR gets superseded by #1670.

@MichailiK MichailiK closed this Aug 24, 2024
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.

2 participants