Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ecd5dcf
Add name for build release workflow
dvdmuckle Feb 21, 2026
e7d32d7
Bump crazy-max/ghaction-import-gpg from 6 to 7
dependabot[bot] Mar 2, 2026
3a4799b
Bump golang.org/x/oauth2 from 0.35.0 to 0.36.0
dependabot[bot] Mar 9, 2026
5ed8826
Bump mislav/bump-homebrew-formula-action from 3 to 4
dependabot[bot] Mar 23, 2026
a6f6836
Bump github.com/zalando/go-keyring from 0.2.6 to 0.2.8
dependabot[bot] Mar 24, 2026
51cb534
Bump release-drafter/release-drafter from 6.2.0 to 7.3.1
dependabot[bot] May 25, 2026
1a49174
Merge pull request #276 from dvdmuckle/dependabot/github_actions/craz…
dvdmuckle Jun 12, 2026
1253b11
Merge pull request #287 from dvdmuckle/dependabot/github_actions/rele…
dvdmuckle Jun 12, 2026
e5df01b
Merge pull request #283 from dvdmuckle/dependabot/go_modules/github.c…
dvdmuckle Jun 12, 2026
c28cf0c
Merge pull request #281 from dvdmuckle/dependabot/github_actions/misl…
dvdmuckle Jun 12, 2026
2e58f16
Merge pull request #277 from dvdmuckle/dependabot/go_modules/golang.o…
dvdmuckle Jun 12, 2026
ed76146
Bump actions/checkout from 6 to 7
dependabot[bot] Jun 22, 2026
698373f
Bump release-drafter/release-drafter from 7.3.1 to 7.5.1
dependabot[bot] Jun 29, 2026
2c9e7a7
Merge pull request #289 from dvdmuckle/dependabot/github_actions/acti…
dvdmuckle Jul 18, 2026
d26e2bb
Merge pull request #290 from dvdmuckle/dependabot/github_actions/rele…
dvdmuckle Jul 18, 2026
1dbacc0
Fix the auth callback URL
dvdmuckle Jul 18, 2026
326c6a4
Merge pull request #291 from dvdmuckle/auth-fix
dvdmuckle Jul 18, 2026
aad3742
Update docs
dvdmuckle Jul 18, 2026
f6dd318
Bump versions
dvdmuckle Jul 18, 2026
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 .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PAT }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: Build Release
on:
release:
types:
Expand Down Expand Up @@ -31,7 +32,7 @@ jobs:
- goos: windows
goarch: amd64
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: compile and release
uses: wangyoucao577/go-release-action@v1.55
with:
Expand All @@ -44,7 +45,7 @@ jobs:
name: Bump Homebrew formula
runs-on: ubuntu-latest
steps:
- uses: mislav/bump-homebrew-formula-action@v3
- uses: mislav/bump-homebrew-formula-action@v4
with:
formula-name: spc
create-pullrequest: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fedora-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Check out proper version of sources
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Install API token for copr-cli
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Get dependencies
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- uses: release-drafter/release-drafter@v6.2.0
- uses: release-drafter/release-drafter@v7.5.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -28,7 +28,7 @@ jobs:
tag-with-semver-v:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PAT }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:

steps:
- name: Check out proper version of sources
uses: actions/checkout@v6
uses: actions/checkout@v7

- uses: crazy-max/ghaction-import-gpg@v6
- uses: crazy-max/ghaction-import-gpg@v7
with:
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Make sure `$GOPATH/bin` is in your `PATH` for this to work.

To set up the app, run `spc config` to generate a skeleton config file at `~/.config/spc/config.yaml` or `.config/spc/config.yaml` in your user directory on Windows.

Next, head to <http://developer.spotify.com/dashboard> to create a new Spotify app. Make sure to set a callback URL for `http://localhost:8888/callback`. Paste the ClientID and ClientSecret in the newly created config file as noted in the file. **Make sure the ClientSecret is base64 encoded.**
Next, head to <http://developer.spotify.com/dashboard> to create a new Spotify app. Make sure to set the callback URL to `http://127.0.0.1:8888/callback` in the Spotify app settings. Paste the ClientID and ClientSecret in the newly created config file as noted in the file. **Make sure the ClientSecret is base64 encoded.**

You can now run `spc auth` to start the OAuth2 flow, which will have you grant the Spotify app you created, and thus `spc`, the correct API permissions.

Expand Down
36 changes: 18 additions & 18 deletions cmd/helper/authHelp.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,33 @@ import (
"github.com/spf13/cobra"
"github.com/zalando/go-keyring"
"github.com/zmb3/spotify/v2"
"github.com/zmb3/spotify/v2/auth"
spotifyauth "github.com/zmb3/spotify/v2/auth"
"golang.org/x/oauth2"
)

const redirectURI = "http://localhost:8888/callback"
const redirectURI = "http://127.0.0.1:8888/callback"

var (
authenticator *spotifyauth.Authenticator
ch = make(chan *spotify.Client)
clientID string
secret string
state = "ringdingthing"
ch = make(chan *spotify.Client)
clientID string
secret string
state = "ringdingthing"
)

func initAuthenticator(clientID string, secret string) {
authenticator = spotifyauth.New(
spotifyauth.WithRedirectURL(redirectURI),
spotifyauth.WithClientID(clientID),
spotifyauth.WithClientSecret(secret),
spotifyauth.WithScopes(
spotifyauth.ScopeStreaming,
spotifyauth.ScopeUserModifyPlaybackState,
spotifyauth.ScopeUserReadPlaybackState,
spotifyauth.ScopePlaylistModifyPrivate,
spotifyauth.ScopePlaylistModifyPublic,
),
)
authenticator = spotifyauth.New(
spotifyauth.WithRedirectURL(redirectURI),
spotifyauth.WithClientID(clientID),
spotifyauth.WithClientSecret(secret),
spotifyauth.WithScopes(
spotifyauth.ScopeStreaming,
spotifyauth.ScopeUserModifyPlaybackState,
spotifyauth.ScopeUserReadPlaybackState,
spotifyauth.ScopePlaylistModifyPrivate,
spotifyauth.ScopePlaylistModifyPublic,
),
)
}

func completeAuth(w http.ResponseWriter, r *http.Request) {
Expand Down
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
spc (1.3.5) noble; urgency=medium

* Dependencies
* Auth fix

-- David Muckle <dvdmuckle@dvdmuckle.xyz> Sat, 18 Jul 2026 14:57:17 -0400

spc (1.3.4) noble; urgency=medium

* Dependencies
Expand Down
13 changes: 5 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
module github.com/dvdmuckle/spc

go 1.24.0

toolchain go1.24.2
go 1.25.0

require (
github.com/golang/glog v1.2.5
github.com/ktr0731/go-fuzzyfinder v0.9.0
github.com/spf13/cobra v1.10.2
github.com/spf13/viper v1.21.0
github.com/zalando/go-keyring v0.2.6
github.com/zalando/go-keyring v0.2.8
github.com/zmb3/spotify/v2 v2.4.3
golang.org/x/oauth2 v0.35.0
golang.org/x/oauth2 v0.36.0
)

require (
al.essio.dev/pkg/shellescape v1.5.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
github.com/danieljoos/wincred v1.2.2 // indirect
github.com/danieljoos/wincred v1.2.3 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/gdamore/encoding v1.0.1 // indirect
github.com/gdamore/tcell/v2 v2.6.0 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/godbus/dbus/v5 v5.2.2 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/ktr0731/go-ansisgr v0.1.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
Expand Down
20 changes: 8 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
al.essio.dev/pkg/shellescape v1.5.1 h1:86HrALUujYS/h+GtqoB26SBEdkWfmMI6FubjXlsXyho=
al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
Expand Down Expand Up @@ -43,8 +41,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0=
github.com/danieljoos/wincred v1.2.2/go.mod h1:w7w4Utbrz8lqeMbDAK0lkNJUv5sAOkFi7nd/ogr0Uh8=
github.com/danieljoos/wincred v1.2.3 h1:v7dZC2x32Ut3nEfRH+vhoZGvN72+dQ/snVXo/vMFLdQ=
github.com/danieljoos/wincred v1.2.3/go.mod h1:6qqX0WNrS4RzPZ1tnroDzq9kY3fu1KwE7MRLQK4X0bs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand All @@ -66,8 +64,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.2.2 h1:TUR3TgtSVDmjiXOgAAyaZbYmIeP3DPkld3jgKGV8mXQ=
github.com/godbus/dbus/v5 v5.2.2/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I=
github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
Expand Down Expand Up @@ -120,8 +118,6 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
Expand Down Expand Up @@ -196,8 +192,8 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/zalando/go-keyring v0.2.6 h1:r7Yc3+H+Ux0+M72zacZoItR3UDxeWfKTcabvkI8ua9s=
github.com/zalando/go-keyring v0.2.6/go.mod h1:2TCrxYrbUNYfNS/Kgy/LSrkSQzZ5UPVH85RwfczwvcI=
github.com/zalando/go-keyring v0.2.8 h1:6sD/Ucpl7jNq10rM2pgqTs0sZ9V3qMrqfIIy5YPccHs=
github.com/zalando/go-keyring v0.2.8/go.mod h1:tsMo+VpRq5NGyKfxoBVjCuMrG47yj8cmakZDO5QGii0=
github.com/zmb3/spotify/v2 v2.4.3 h1:4divquzK2Mzo90XVIij4K7Z98Hf+6A3qPnksqtcDIuo=
github.com/zmb3/spotify/v2 v2.4.3/go.mod h1:XOV7BrThayFYB9AAfB+L0Q0wyxBuLCARk4fI/ZXCBW8=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
Expand Down Expand Up @@ -285,8 +281,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20210810183815-faf39c7919d5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.35.0 h1:Mv2mzuHuZuY2+bkyWXIHMfhNdJAdwW3FuWeCPYN5GVQ=
golang.org/x/oauth2 v0.35.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=
golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down
6 changes: 5 additions & 1 deletion spc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# https://github.com/dvdmuckle/spc

%global goipath github.com/dvdmuckle/spc
%global tag 1.3.4
%global tag 1.3.5
Version: %{tag}
%gometa

Expand Down Expand Up @@ -87,6 +87,10 @@ install -m 0644 -vpt %{buildroot}%{_mandir}/man1/ %{gobuilddir}/spcdocs/spc*
%gopkgfiles

%changelog
* Sat Jul 18 2026 David Muckle <dvdmuckle@dvdmuckle.xyz> - 1.3.5-1
- Dependencies
- Fix auth flow

* Sat Feb 21 2026 David Muckle <dvdmuckle@dvdmuckle.xyz> - 1.3.4-1
- Dependencies

Expand Down
Loading