aerni/laravel-spotify

Dynamic API Keys

robman2100 opened this issue · 1 comments

Is there a way to set api keys based on user? For instance. I can set it in the ENV but I would like to have a more database driven solution on requests. So If somone Logins they can run the requests through their API keys.

aerni commented

There's a SpotifyAuth class that takes the clientId and clientSecret to authenticate a user. The binding is done in the ServiceProvider. I haven't tested this, but there might be a way to change the binding of that class on a request basis. Check out the Service Provider documentation.