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

Deleting client gives: panic: secret not found in keyring #22

Open
berenddeboer opened this issue Apr 1, 2021 · 2 comments
Open

Deleting client gives: panic: secret not found in keyring #22

berenddeboer opened this issue Apr 1, 2021 · 2 comments

Comments

@berenddeboer
Copy link

When I try to delete a client I get:

./xoauth delete dummy
? Are you sure you want to delete this connection? Yes
panic: secret not found in keyring

goroutine 1 [running]:
github.com/XeroAPI/xoauth/pkg/config.ConfirmDelete(0xc0000cb100, 0x7fffaed9815d, 0x5)
        /home/runner/work/xoauth/xoauth/pkg/config/delete.go:30 +0x286
github.com/XeroAPI/xoauth/cmd.init.0.func6(0xc0000f1340, 0xc0000cb0a0, 0x1, 0x1)
        /home/runner/work/xoauth/xoauth/cmd/root.go:127 +0x52
github.com/spf13/cobra.(*Command).execute(0xc0000f1340, 0xc0000cb080, 0x1, 0x1, 0xc0000f1340, 0xc0000cb080)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:846 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0xd1f720, 0x0, 0x8815a0, 0xc000098058)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:887
github.com/XeroAPI/xoauth/cmd.Execute(...)
        /home/runner/work/xoauth/xoauth/cmd/root.go:254
main.main()
        /home/runner/work/xoauth/xoauth/xoauth.go:13 +0x47
@nikhilfsoft
Copy link

Same issue here. Is there any solution to this?

@Ian2020
Copy link

Ian2020 commented May 26, 2021

This happened for me with a PKCE client as the code tries to delete a client secret that's not there (PKCE clients don't need one). If that's your use-case and you can't wait for the fix you can workaround it in the short-term by very carefully (backup first!):

  • Opening ~/.xoauth/xoauth.json and removing the client by hand from the JSON
  • Deleting all relevant entries from your system keyring

I've submitted a PR to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants