Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-spotify

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-spotify

Spotify SDK bindings for Cordova Applications

  • 0.4.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Cordova Spotify SDK Plugin (Beta)

Greenkeeper badge

An Apache Cordova plugin providing a thin wrapper over the Spotify SDK for iOS and Android.

Features

This plugin provides a very thin layer over the authentication and playback functionality of the Spotify SDK. It allows your users to authenticate using OAuth 2.0 and allows you to play Spotify tracks via their URI. Metadata functionality has deliberately been left out in favor of the Web API. After your users have been authenticated, you are given the access token, so accessing the Web API is trivial.

Stability

This plugin is currently in beta. This means its reasonably stable but hasn't seen much production use yet. This plugin will be used in the new Festify, so it will be production-ready once Festify is released. We will fix bugs as soon as we find them.

Contributing

Pull requests are very welcome! Please use the gitmoji style for commit messages.

Installation

cordova plugin add cordova-spotify

API documentation will be provided at a later stage when the stability has improved.

Note: Make sure your installation path doesn't contain any spaces.

Token Exchange Service

The Spotify SDK needs some server code for the OAuth authentication because this plugin uses the authorization code flow only. This is because you probably don't want your users to have to login repeatedly every hour. Take a look at the Spotify documentation for more information.

To easily implement the endpoints for the token swap and token refresh service, we built a Serverless service for AWS Lambda. Make sure you install the Serverless Framework properly!

For the execution of the functions to work you need to set some environmental configuration in the file oauth-token-api/.env

CLIENT_ID="<Your Spotify Client ID>"
CLIENT_SECRET="<Your Spotify Client Secret>"
CLIENT_CALLBACK_URL="<The callback url of your app>" # e.g. "festify-spotify://callback"
ENCRYPTION_SECRET="<Secret used to encrypt the refresh token - please generate>"

You can then deploy the functions like this:

cd oauth-token-api
serverless deploy

Also, you need to register the client callback protocol inside the App Info.plist so that iOS knows which app to start when it is redirected when the authentication is done. Take a look at this repository to see how it's done.

Keywords

FAQs

Package last updated on 21 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc