-
Notifications
You must be signed in to change notification settings - Fork 10
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
Comments
Try and do this without having to put up a web-page to authenticate users first before getting oauth codes |
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 ? |
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. |
Hi projectgoav, |
@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. |
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. |
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. |
It's my main goal :) being able to play songs without using any web plugin or anything else. |
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. |
Thanks for your advice. I've already tried to do that but didn't managed to make it work. |
Allow in-lib authentication of users.
The text was updated successfully, but these errors were encountered: