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.
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.