
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
spotify-login
Advanced tools
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>
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>
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
clientId | client-id | Client ID for Spotify OAuth application | string | undefined |
redirectUri | redirect-uri | The URI to redirect to after the user grants or denies permission. | string | undefined |
responseType | response-type | Scope for Spotify OAuth application | string | "token" |
scope | scope | Scope for Spotify OAuth application | string | undefined |
showDialog | show-dialog | Whether or not to force the user to approve the app again if they’ve already done so. | boolean | undefined |
state | state | The state can be useful for correlating requests and responses | string | undefined |
| Event | Description | Type |
|---|---|---|
completed | Call with success | CustomEvent<any> |
fail | Call with error | CustomEvent<any> |
request | Call with request | CustomEvent<any> |
Download stats for this NPM package.
Spotify Login is open source software licensed as MIT.
FAQs
Web Component for Spotify Login
The npm package spotify-login receives a total of 9 weekly downloads. As such, spotify-login popularity was classified as not popular.
We found that spotify-login demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.