0

In my libspotify-based app, can I prompt the user for a single sign-in with his (Facebook) credentials to connect both to Spotify and Facebook ?

Scenario #1 could be :

  • My libspotify-based app is also a registered Facebook app.
  • User authorizes and connects to my app using his Facebook credentials.
  • Thanks to that user session I would like to connect to his Spotify account Is that possible ?

Or Scenario #2... which goes against oauth security :

  • User connects to my libspotify-based app with his facebook credentials (it works)
  • the app somehow - how ? - gets Facebook session tokens
  • the app uses those tokens to access authorized facebook info such as what the user's friend listen to and so on.
  • the app uses those tokens to require more permissions ?

Or is there a better scenario so I can achieve this single sing-in process ?

Thanks for your help.

prx
  • 65
  • 6

1 Answers1

0

This login flow isn't possible with libSpotify — the user has to log in with a username or password, whether it's a Spotify or Facebook account and you can't extract a Facebook auth token from libSpotify once it's logged in.

iKenndac
  • 18,730
  • 3
  • 35
  • 51
  • Good to know. Thanks. Is it something you plan to enable in the future ? – prx May 05 '12 at 17:03
  • Related post [here](http://stackoverflow.com/questions/9528982/does-libspotify-support-oauth) – prx May 05 '12 at 17:04
  • An auth token allows a single application to access Facebook. Your application and Spotify aren't the same thing, so you need two separate access tokens. It's the same with the Apps API — apps running inside Spotify need to auth with Facebook independently of Spotify itself. – iKenndac May 05 '12 at 21:26