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

Refresh without client_secret // device flow and PKCE support #51

Open
hansmbakker opened this issue Jan 16, 2023 · 4 comments
Open

Refresh without client_secret // device flow and PKCE support #51

hansmbakker opened this issue Jan 16, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@hansmbakker
Copy link

Hi @witnessmenow,
nice library! 👍

I saw that currently the token refresh calls are depending on client_secret:

const char *refreshAccessTokensBody =
R"(grant_type=refresh_token&refresh_token=%s&client_id=%s&client_secret=%s)";

However, there are some flows where the client_secret is not needed - it is not needed when the refresh_token was obtained using the device flow, and I see it is also not needed when the PKCE flow was followed.

Would you be open to have changes in your library where the client_secret is optional so that the refresh_token can be fetched using the client_id only?

@hansmbakker hansmbakker changed the title Refresh without client_secret // device flow support Refresh without client_secret // device flow and PKCE support Jan 16, 2023
@witnessmenow
Copy link
Owner

Thanks!

Yeah I'd be happy to accept once it's documented, doesn't sound like it will be a major change

@hansmbakker
Copy link
Author

What do you mean with documented?

PKCE is documented in the spotify documentation. I wrote down the calls for the device flow as well in the forum post - if needed I can clarify those.

@witnessmenow
Copy link
Owner

witnessmenow commented Jan 17, 2023 via email

@hansmbakker
Copy link
Author

Aah like that, I understand.

@witnessmenow witnessmenow added the enhancement New feature or request label Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants