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

LMS/Daphile Soundcloud plugin. Login blocked #47

Open
DrJack99 opened this issue Nov 2, 2024 · 3 comments
Open

LMS/Daphile Soundcloud plugin. Login blocked #47

DrJack99 opened this issue Nov 2, 2024 · 3 comments

Comments

@DrJack99
Copy link

DrJack99 commented Nov 2, 2024

Any new policy by Soundcloud in order to LMS/daphile integration? I can't login anymore.
Thank you for your help
Roberto
Souncloud Daphile

@danielvijge
Copy link
Owner

ignore my previous (deleted) message

Not sure if this is related to the migration to OAuth 2.1. But this should have been disabled by 1 October 2024.

This plugin is using the JavaScript SDK, which I assume would continue to work, but I now see that this is also deprecated.

Solution might be to use either a browser-based or server-side OAuth 2.1 library.
But really not sure when I can find to time to investigate.

As always, any pull request is welcome.

@Sabb0
Copy link

Sabb0 commented Nov 2, 2024

I have the same as OP, unfortunately.

Do you have a slightly more ELI5 method to get this working? Thank you :)

@danielvijge
Copy link
Owner

danielvijge commented Nov 2, 2024

Did a first quick investigation. It is indeed related to the new OAuth 2.1 login requirements.

A flow to solve this would be:

  • When opening the settings page generate a PKCE token
  • When user clicks on the Login button, open the SoundCloud login page with the PKCE token (and maybe make server name as state parameter so it can also be displayed on the callback page )
  • After login, it redirects to the callback page. Modify this page to extract code from the query parameters. Display this to the user (and maybe with the server name from state parameter)
  • User has to copy the code and fill this in on a form on the settings page. User clicks on an Authorise button
  • POST to the token endpoint using the code and earlier generated PKCE.
  • Extract the access_token and refresh_token and store it in the settings

Additionally:

  • Each API request would also need to verify if the acess token is still valid, else use the refresh token to get a new access token.

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

No branches or pull requests

3 participants