This library requires API tokens to access GitHub and Spotify APIs. Follow these security best practices:
β DO:
- Store tokens in environment variables
- Use
.envfiles for local development (add to.gitignore) - Use secure secret management in production
- Rotate tokens regularly
β DON'T:
- Hardcode tokens in your source code
- Commit tokens to version control
- Share tokens in plain text
- Use tokens in client-side code
Create a token at: https://github.com/settings/tokens
Minimum scopes needed:
repo- Access to repositoriesuser- Access to user profileread:org- Access to organization data
Get tokens via OAuth 2.0 flow: https://developer.spotify.com/documentation/web-api/tutorials/getting-started
Required scopes depend on usage:
user-read-private- User profile accessuser-read-email- User email accessplaylist-read-private- Private playlistsuser-library-read- Saved tracks/albumsuser-modify-playback-state- Control playbackuser-read-playback-state- Current playback info
Create a .env file in your project root:
# GitHub
GITHUB_TOKEN=ghp_your_github_personal_access_token_here
# Spotify
SPOTIFY_ACCESS_TOKEN=your_spotify_access_token_hereimport { GitHub, Spotify } from '@remcostoeten/fync'
// Use environment variables
const github = GitHub({
token: process.env.GITHUB_TOKEN
})
const spotify = Spotify({
token: process.env.SPOTIFY_ACCESS_TOKEN
})If you discover a security vulnerability, please report it privately:
- Do NOT create a public GitHub issue
- Email security concerns to: [[email protected]]
- Include detailed information about the vulnerability
- Allow reasonable time for response before public disclosure
| Version | Supported |
|---|---|
| 3.x.x | β Full support |
| 2.x.x | |
| < 2.0 | β No longer supported |
Security updates will be released as patch versions and announced in:
- GitHub Security Advisories
- Release notes
- npm package updates