Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Missing refresh_token When Using S256 Code Challenge Method

    Posted 05-08-2025 16:00

    I am trying to build authenticate into the servers. I can authenticate with no problem. However, when I use challenge_code_method S256 the server returns only access_token without refresh_token. It is strange to me that the refresh_token is not returned in this case.

    Any idea why or more importantly, is there a work around on obtaining a refresh token when challenge_code_method is used?


    #Integrations

    ------------------------------
    Mike Alhayek
    Title
    ------------------------------


  • 2.  RE: Missing refresh_token When Using S256 Code Challenge Method

    Posted 05-09-2025 03:48

    Hello,

    Refreshing tokens is not supported with Genesys Cloud when using the PKCE Grant (the one using the S256 code challenge method)

    It is only supported with the "legacy" Authorization Code Grant.

    Regards,



    ------------------------------
    Jerome Saint-Marc
    Senior Development Support Engineer
    ------------------------------



  • 3.  RE: Missing refresh_token When Using S256 Code Challenge Method

    Posted 05-09-2025 09:25

    Hello,

    I am having hard time making sense of that response. 

    First, PKCE is not a grant it is an extension to the authorization code grant which can't be legacy because it is currently the most secure way to authenticate. Now, you also mentions "the one using the S256 code challenge method". Does this mean that your API supports other methods that will also include a refresh token?

    Thanks for your help!



    ------------------------------
    Mike Alhayek
    Title
    ------------------------------



  • 4.  RE: Missing refresh_token When Using S256 Code Challenge Method

    Posted 05-09-2025 09:55
    Edited by Jerome Saint-Marc 05-09-2025 09:55

    I was referring to Authorization Code Grant as "legacy" (between quotes), from a Genesys Cloud standpoint, as this OAuth grant flow has been supported for a while. The support for OAuth PKCE Grant flow was added in Genesys Cloud a year and a half  or two years ago.

    I wrote "the one using the S256 code challenge method" to make a reference to the OAuth flow you were mentioning as you didn't specify what OAuth Grant flow it was apart from "I use challenge_code_method S256".

    "Does this mean that your API supports other methods that will also include a refresh token?" No, Authorization Code Grant flow is the only one with refresh token support with Genesys Cloud. Supported OAuth grant flows are listed here.

    Hope this clarifies.

    Regards,



    ------------------------------
    Jerome Saint-Marc
    Senior Development Support Engineer
    ------------------------------



  • 5.  RE: Missing refresh_token When Using S256 Code Challenge Method

    Posted 05-09-2025 10:48

    Thank you.

    I still don't understand why we don't provide a refresh token when using PKCE. The fact that we provide refresh token when using code authorization grant we should also provide it when using the PKCE extension. 

    I am guessing the answer is that you don't based on internal "non-standard" design and this isn't a bug. It's unfortunate the product does not officially support industry standard protocols like oAuth 2.0 or OpenID.

    FYI, this all came up while trying to contribute Genesys as a supported provided in the C# community (OpenIddict library) https://github.com/openiddict/openiddict-core/commit/0c58cba5153f4b6e0a24b65545d5c34a848d5409 any way that implementation was merged without the support for S256 code_challenge. More about that on this comment: https://github.com/openiddict/openiddict-core/commit/0c58cba5153f4b6e0a24b65545d5c34a848d5409#diff-14fd22eb7aa70194dd6bebf8ff1225b238c3deb13f9d6d96f6f3c1515bad4d49R820-R824

    You may want to encourage your team to look at it



    ------------------------------
    Mike Alhayek
    Title
    ------------------------------