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

Enable AuthorizationCodeCredential for PublicClientApplication #493

Closed
wants to merge 9 commits into from

Conversation

Jeadie
Copy link

@Jeadie Jeadie commented Sep 3, 2024

Copy link
Owner

@sreeise sreeise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are you expecting to use the AuthorizationCodeCredential in a spa application? You wouldn't make a normal post token request to get an access token. The access token would come on the redirect from login.

Are you saying this is an issue with refreshing tokens?

That warning is not saying don't use a client secret. Its saying dont use this flow in a spa application becuase of the client secret.

@sreeise
Copy link
Owner

sreeise commented Sep 9, 2024

@Jeadie I think I see what the issue is. You want to use a spa based public client via authorization code credential. Your access token and refresh token both come on the redirect. But your AuthorizationCodeCredential doesn't use a client secret in this type of flow. This would be the implicit flow but this has also been changed to be the Auth code flow with PKCE. Is this correct?

Can you please provide an description of what it is you are expecting to happen and the walk through of the flow your using exactly?

I think what your looking for is detailed here right? https://learn.microsoft.com/en-us/entra/identity-platform/reference-third-party-cookies-spas#overview-of-the-solution

@sreeise
Copy link
Owner

sreeise commented Sep 15, 2024

@Jeadie Take a look at #495

This adds a credential for Spa applications using a public client.

@Jeadie
Copy link
Author

Jeadie commented Sep 24, 2024

We're attempting to have users (running a tool locally), retrieve a AuthorizationCodeCredential via a redirect_url to a server running locally in the tool. Users cannot have access to a client_secret or equivalent.

@sreeise
Copy link
Owner

sreeise commented Oct 1, 2024

We're attempting to have users (running a tool locally), retrieve a AuthorizationCodeCredential via a redirect_url to a server running locally in the tool. Users cannot have access to a client_secret or equivalent.

Gotcha. Thanks for the response. I beleive #495 should solve this issue still. In that PR I made the PKCE required because thats what the auth flow says is required. But if its allowing you to do so without it I can make it optional. Let me know.

@sreeise
Copy link
Owner

sreeise commented Oct 8, 2024

Closing this out as the other work I mentioned got merged and I havn't heard anything back here. Let me know if there is an issue going forward.

@sreeise sreeise closed this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants