Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  PKCE Support for OAuthWebViewForm in C# Applications (Visual Studio)

    Posted 11-10-2025 03:28

    I am currently developing a C# application in Visual Studio and using the OAuthWebViewForm component for user authentication with Genesys Cloud.
    I understand that the Implicit Grant flow will soon be deprecated, and the recommended authentication method is Authorization Code Grant with PKCE.

    However, it appears that the current OAuthWebViewForm implementation for C# does not support PKCE and only works with the Implicit Grant flow.

    Could you please clarify the following:

    • Is there a PKCE-compatible version of OAuthWebViewForm available for C# applications?
    • Are there any plans to update OAuthWebViewForm to support PKCE in the future?
    • If not, what is the recommended approach for implementing PKCE authentication in C# desktop applications? If possible, could you provide any official guidance or sample code?

    Thank you very much for your assistance.

    Best regards,


    #PlatformAPI
    #PlatformSDK

    ------------------------------
    Naoki Ono
    ------------------------------


  • 2.  RE: PKCE Support for OAuthWebViewForm in C# Applications (Visual Studio)

    Posted 15 days ago

    Hello,

    For your information, I have updated the sample code in the "Genesys Cloud - .NET OAuth WebView2 Control" repository - https://github.com/MyPureCloud/oauth-webview-dotnet

    Only the sample code is updated. There is no new version for the nuget package at this time (i.e. library managed by nuget package manager). Developers can simply import the code in their project (or build the library project locally) and use it in their code.

    The updated GenesysCloudOAuthWebView can initiate an OAuth Implicit Grant Flow or an OAuth PKCE Grant Flow.

    The choice of OAuth flow is controlled using the OAuthConfig's IsPKCEGrant property (default: true). PKCE Grant is defined as the default OAuth flow.

    Deprecation/Replacement in V2: the v1 BeginImplicitGrant() method is replaced with BeginOAuthGrant() method in v2.

    The OAuth WebView sample project generates the libraries for different framework versions: .Net Core 3.1, .Net Framework 4.7.2, .Net 8.0 (Windows), .Net 10.0 (Windows).

    Information on v2 can be found in the README file: https://github.com/MyPureCloud/oauth-webview-dotnet/blob/main/README.md

    Regards,



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