This repository was archived by the owner on Apr 20, 2021. It is now read-only.
add username/password authentication.#29
Open
beanieboi wants to merge 2 commits intogrobie:masterfrom
Open
Conversation
first auth: start the app with --auth option and provide your username and password once this is done, the access token gets refreshed everytime you start the app
lib/soundcloud2000.rb
Outdated
Collaborator
There was a problem hiding this comment.
For obvious reasons it is wrong to expose the client secret.
Unfortunately the soundcloud developer documentation is not clear about that.
The oauth spec offers a couple of possible flows here, all more or less inconvenient:
http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-9
Actually I think the solution is similar to the client-side flow here:
http://developers.soundcloud.com/docs#authentication
Somehow the user has to see the connect screen, which is a login effectively.
The user-agent redirects to the given redirect url, which also contains the code and the token.
Maybe it is possible to call this endpoint directly with username/password and get back the non-expiring token.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hey!
first of all, thanks for sondcloud2000! 👍
i implemented the feature mentioned in #16 but i'm not sure what to do with it, maybe someone can take this further.
also i'm not sure how to handle the client_secret, do you have any ideas?
this is how it works:
first auth: start the app with --auth option and provide your username and password
once this is done, the access token gets refreshed every time you start the app
any feedback is welcome!
ben