binalogue / nova-spotify-auth-tool
A Spotify auth tool to use in your Laravel Nova apps.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:package
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2025-02-21 23:41:14 UTC
README
This Nova tool adds a Spotify auth section to the Nova Sidebar. Under the hood it uses the mgoigfer/laravel-spotify-wrapper package.
You can authenticate yourself through Spotify API and store a refresh token to your database.
Installation
-
You must install mgoigfer/laravel-spotify-wrapper into your Laravel app.
-
You can install this package via Composer:
composer require binalogue/nova-spotify-auth-tool
- Register the tool in
app/Providers/NovaServiceProvider
:
public function tools() { return [ new \Binalogue\SpotifyAuthTool\SpotifyAuthTool, ]; }
- Publish and run the application migrations:
php artisan vendor:publish --provider="Binalogue\SpotifyAuthTool\SpotifyAuthToolServiceProvider"
php artisan migrate
- Register the following redirect URI in your Spotify app:
<APP_URL>/nova-vendor/nova-spotify-auth-tool/auth
Usage
To get the Spotify user ID and the refresh token stored in the database:
use Binalogue\SpotifyAuthTool\Facades\Spotify; $userId = Spotify::userId(); $refreshToken = Spotify::refreshToken();
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.