Skip to content

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

Open
@hansmbakker

Description

@hansmbakker

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?

Activity

changed the title [-]Refresh without client_secret // device flow support[/-] [+]Refresh without client_secret // device flow and PKCE support[/+] on Jan 16, 2023
witnessmenow

witnessmenow commented on Jan 16, 2023

@witnessmenow
Owner

Thanks!

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

hansmbakker

hansmbakker commented on Jan 17, 2023

@hansmbakker
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

witnessmenow commented on Jan 17, 2023

@witnessmenow
Owner
hansmbakker

hansmbakker commented on Jan 17, 2023

@hansmbakker
Author

Aah like that, I understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @witnessmenow@hansmbakker

        Issue actions

          Refresh without client_secret // device flow and PKCE support · Issue #51 · witnessmenow/spotify-api-arduino