https://github.com/paulphys/spotify-next-auth-token-rotation
NextAuth Refresh Token Rotation for Spotify OAuth
https://github.com/paulphys/spotify-next-auth-token-rotation
next-auth spotify-api
Last synced: 11 months ago
JSON representation
NextAuth Refresh Token Rotation for Spotify OAuth
- Host: GitHub
- URL: https://github.com/paulphys/spotify-next-auth-token-rotation
- Owner: paulphys
- Created: 2022-10-08T12:22:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-08T21:00:19.000Z (over 3 years ago)
- Last Synced: 2024-04-25T01:31:10.384Z (about 2 years ago)
- Topics: next-auth, spotify-api
- Language: TypeScript
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spotify NextAuth Token Rotation
This repository expands the [NextAuth.js Refresh Token Rotation example](https://github.com/nextauthjs/next-auth-refresh-token-example) to Spotify OAuth 2.0.
## Setup
### Spotify API
- [Sign up for a Spotify developer account](https://developer.spotify.com/dashboard)
- Create a new application
- Add `http://localhost:3000/api/auth/callback/spotify` as Redirect URI
- Copy `Client ID` and `Client Secret`
### Develop locally
```bash
git clone https://github.com/paulphys/spotify-next-auth-token-rotation
cd spotify-next-auth-token-rotation
yarn
yarn dev
```
### Environment variables
Create a `.env` file similar to [`.env.example`](https://github.com/paulphys/spotify-next-auth-token-rotation/blob/main/.env.example) in the root of the application and fill in all values.