Skip to content

[Feature Request] PKCE with Non Interactive Authentication #728

Description

MSAL client type

Public

Problem Statement

Hello,

I would like to create a flask webapp where the user authenticate with the PublicClientApplication and not the ConfidentialClientApplication. For this, I read in the documentation that I should use PKCE.

I did the following:

flow = msal_app.initiate_auth_code_flow(
        scopes=["User.Read"],
        redirect_uri=REDIRECT_URI
    )
    
session["flow"] = flow

and then.

result = msal_app.acquire_token_by_auth_code_flow(
                session.get("flow", {}), 
                request.args
            )

I saw that the flow dict contains the code verifier which should be enough for the PKCE. However, I get the following error:

invalid_client - AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.

Proposed solution

I would like a way of authenticating without storing the Client_Secret or using Interactive Browser, i.e. using PKCE.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions