New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

spotify-login

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spotify-login

Web Component for Spotify Login

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
10
42.86%
Maintainers
1
Weekly downloads
 
Created
Source

Spotify Login - DEMO

npm versionLicense: MITBuild StatusDependenciesLanguage grade: JavaScript

How to install

It is possible to install with npm:

npm i spotify-login
// OR
yarn add spotify-login

Or import the script through the unpkg project:

<script src="https://unpkg.com/spotify-login/dist/spotify-login.js"></script>

How to usage

An example of how to use the webcomponent with html:

<spotify-login
  client-id="XXX"
  scope="user-read-email"
  redirect-uri="http://localhost:8000"
>
  <button>Login with Spotify</button>
</spotify-login>

<script>
  const spotifyLoginElement = document.querySelector("spotify-login");

  spotifyLoginElement.addEventListener("completed", e => {
    console.log(e.details);
  });
  spotifyLoginElement.addEventListener("fail", e => {
    console.log(e);
  });
</script>

With JSX:

<spotify-login onCompleted={e => console.log(e)} onError={e => console.log(e)}>
  <button>Login with Spotify</button>
</spotify-login>

Properties

PropertyAttributeDescriptionTypeDefault
clientIdclient-idClient ID for Spotify OAuth applicationstringundefined
redirectUriredirect-uriThe URI to redirect to after the user grants or denies permission.stringundefined
responseTyperesponse-typeScope for Spotify OAuth applicationstring"token"
scopescopeScope for Spotify OAuth applicationstringundefined
showDialogshow-dialogWhether or not to force the user to approve the app again if they’ve already done so.booleanundefined
statestateThe state can be useful for correlating requests and responsesstringundefined

Events

EventDescriptionType
completedCall with successCustomEvent<any>
failCall with errorCustomEvent<any>
requestCall with requestCustomEvent<any>

NPM Statistics

Download stats for this NPM package.

NPM

License

Spotify Login is open source software licensed as MIT.

Keywords

spotify

FAQs

Package last updated on 30 Mar 2020

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