Skip to content

Token authentication doesn't work if default user credentials are defined in client.yml #650

Closed
@Xinayder

Description

@Xinayder

🐞 Describe the bug

Trying to use ntfy CLI with token authentication seems to fail if the client.yml settings file has default user credentials configured, i.e., the fields default-user and default-password are set.

💻 Components impacted

ntfy server

💡 Screenshots and/or logs

Setting client.yml with default-user: user and default-password: password:

$ ntfy pub -d --token=<redacted> https://notify.mydomain.com/teste testing message

2023/03/03 16:30:53 DEBUG notify.mydomain.com/teste Publishing message with headers map[Authorization:[Basic <redacted>]]
{"code":40101,"http":401,"error":"unauthorized","link":"https://ntfy.sh/docs/publish/#authentication"}

🔮 Additional context

$ ntfy token list

user user
- <redacted>, never expires, accessed from 0.0.0.0 at 03 Mar 23 16:29 UTC

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions