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

RefreshAuthTokenAsync requires a client secret, but Device Code Flow auth doesn't use one for public clients #413

Open
chrishayesmu opened this issue Jan 10, 2025 · 0 comments

Comments

@chrishayesmu
Copy link

Requiring a client secret is consistent with the Twitch documentation for refreshing tokens, but the documentation is also wrong; see this docs issue.

When performing device code grant flow with a public client, there is no client secret in use. The DCF-specific docs state that public clients "can refresh an access token without passing a client secret". This turns out to be true in practice; public clients can indeed omit the client_secret parameter when calling the refresh API.

Since RefreshAuthTokenAsync follows the specification of the former (mistaken) Twitch docs, it is unusable for refreshing DCF tokens for public clients. It's not too hard to just make the call without TwitchLib, though it is confusing.

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

1 participant