Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/algoritmau/spotify-app
Web app to visualize personalized Spotify content
https://github.com/algoritmau/spotify-app
create-react-app express expressjs heroku herokuapp node nodejs react reactjs spotify spotify-api styled-components
Last synced: about 6 hours ago
JSON representation
Web app to visualize personalized Spotify content
- Host: GitHub
- URL: https://github.com/algoritmau/spotify-app
- Owner: algoritmau
- Created: 2021-11-25T15:30:55.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-16T23:47:23.000Z (almost 3 years ago)
- Last Synced: 2024-05-02T05:21:35.667Z (7 months ago)
- Topics: create-react-app, express, expressjs, heroku, herokuapp, node, nodejs, react, reactjs, spotify, spotify-api, styled-components
- Language: JavaScript
- Homepage: https://mispotify.herokuapp.com
- Size: 1.52 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spotify App
## Features
- Uses the Spotify Web API to fetch data
- Uses `localStorage` to store the user's authorization tokens
- Uses React Router to navigate between pages
- Uses Styled Components to style the app### `localStorage`
- Upon first visit, the app will request authorization from the user, the user logs in, and the app will store the user's authorization and refresh tokens (from query params) in `localStorage`.
- Store times in `localStorage` to prevent the app from requesting authorization again if the user refreshes the page.
- Upon next API call, the app will check if the user's authorization has expired. If not, the app will use the stored authorization tokens. Otherwise, use refresh token to get new authorization tokens (by hitting the `/refresh_token` endpoint).A total of four items are stored in `localStorage`:
- Spotify access token
- Spotify refresh token
- Spotify access token expiration time (3600 seconds)
- Timestamp of last time the currently used access token was fetched and stored.