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

OAuth #7

Open
projectgoav opened this issue Oct 26, 2015 · 11 comments
Open

OAuth #7

projectgoav opened this issue Oct 26, 2015 · 11 comments

Comments

@projectgoav
Copy link
Owner

Allow in-lib authentication of users.

@projectgoav
Copy link
Owner Author

Try and do this without having to put up a web-page to authenticate users first before getting oauth codes

@xfischer
Copy link
Contributor

xfischer commented Nov 4, 2015

Hi projectgoav, why not in a first step generate a token via https://developers.deezer.com/api/explorer, and prepare all the APIs to pass the access_token in the query string ?
The token generation could be done in parallel, but would not impact the APIs.

@projectgoav
Copy link
Owner Author

From what I've read and used of the API so far, if you request a token with any permissions other than "offline_access" then the token expires after a certain amount of time. The idea would be that in the background, if the token has expired, the library would request a new one and retry the request.

I'll need to look into a bit more before I commit to anything, but what you've suggested probably the best idea for now.

@projectgoav
Copy link
Owner Author

As of 7b98e5d an access token can be passed in and most user (get) methods will now work, as per @xfischer's suggestion. An updated Nuget package + wiki docs will be out in a couple of days once I've fixed the few remaining bugs.

@Patafoin
Copy link

Patafoin commented Apr 8, 2016

Hi projectgoav,
Did you managed to implement oAuth into your library ?
I've seen you've added some "oAuth stuff" into your code but I don't understand what I have to do to get identified.
I would like to get the oAuth response accessToken to use it with the new native deezer SDK to play music.
Thanks.

@projectgoav
Copy link
Owner Author

@Patafoin - TL;DR - My libary doesn't allow you to obtain access tokens via Deezer's OAuth service. It can only use them, but your application must provide them.

At the time of implementing, there was no way to get an access token from Deezer without using a pop-up webpage, allowing users to accept application permissions. That was outwith the scope of this library, and would add to many dependencies, so this is something you'll have to implement yourself.

I didn't know there was a new native library out, so I will need to have a look at this (thanks for pointing it out!). If it allows you to obtain a token without showing a pop-up up would be something I would certainly like to include in this library.

@Patafoin
Copy link

Patafoin commented Apr 8, 2016

we can discuss about this in private if you want. I have contacted deezer devs team and they sent me a sample code to adapt native library into a CLI class.
The only problem I have now (I've implemented oAuth through an embedded webbrowser) is that it returns me a USER_ACCESS_TOKEN_FAILED response when trying to connect with it... We could work together on this if you want.
I've tried to contact you through your "contact" link on your web site but it redirects on your homepage.

@projectgoav
Copy link
Owner Author

I understand you can wrap up native libraries to make them callable in a .NET application. Having a quick look at the docs for the native library I don't see how it is any different from what I have implemented here as you still need to provide an access token you have obtained through some other method but, it does give you the ability to play tracks.

I'm pretty busy the now, but will definately get around to looking at the natvie library in more detail and perhaps incorporate it into this library in the coming months.

@Patafoin
Copy link

Patafoin commented Apr 8, 2016

It's my main goal :) being able to play songs without using any web plugin or anything else.

@projectgoav
Copy link
Owner Author

If you're wanting to do that, why not just use the Javascript SDK? Then you can have a hidden webview that is the player which you control through your application? Someone else a while back was asking about how to play songs and they suggested that. It's a similar approach to how the Miam-Player allows you to play Deezer songs.

@Patafoin
Copy link

Patafoin commented Apr 8, 2016

Thanks for your advice. I've already tried to do that but didn't managed to make it work.
Currently, the deezer plugin for miam-player isn't available anymore. I've written to the author to know if he will be able to make it available again (he is rewriting it into a new version).

@projectgoav projectgoav modified the milestones: 4.3, 5.X Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants