Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to provide custom redirect URI #22

Merged
merged 2 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 18.4.0
nodejs 18.7.0
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ To use this plugin you must provide some authentication information to Spotify a

To do so, go to [Spotify Dev Dashboard](https://developer.spotify.com/dashboard) and create an app. Once this is done you will have your clientId and clientSecret.

By default, if you do not set the redirect URI in the app setting, it will be set to `https://example.com/callback`. This is the URI I use in all the examples below. If you want to use another redirect URI, you will need to set it in the app setting in your Spotify Dev Dashboard and also set the same URI in the plugin's config. If you don't do that you will end up with an Invalid Redirect URI error.

2. Obtain the auth code that this plugin will need to generate the access and refresh tokens

To do so, you need to allow access to the app you created at the previous step. You only need to do this once.
Expand Down
1 change: 1 addition & 0 deletions config.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"spotifyClientId": "...",
"spotifyClientSecret": "...",
"spotifyAuthCode": "...",
"spotifyRedirectUri": "https://example.com/callback",
"devices": [
{
"deviceName": "A Speaker",
Expand Down
6 changes: 6 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
"type": "string",
"required": true
},
"spotifyRedirectUri": {
"title": "Spotify Redirect URI",
"type": "string",
"default": "https://example.com/callback",
"required": true
},
"spotifyAuthCode": {
"title": "Spotify Auth Code",
"type": "string",
Expand Down
Loading