[Bug] EnableTokenAcquisitionToCallDownstreamApi overrides response_type preventing use of hybrid flow
See original GitHub issueWhich version of Microsoft Identity Web are you using? 1.9.1
Where is the issue?
- Web app
- Sign-in users
- [ x] Sign-in users and call web APIs
- Web API
- Protected web APIs (validating tokens)
- Protected web APIs (validating scopes)
- Protected web APIs call downstream web APIs
- Token cache serialization
- In-memory caches
- Session caches
- Distributed caches
- Other (please describe)
Is this a new or an existing app? We’re upgrading our .NET Framework app to .NET 5
Repro
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(options =>
{
Configuration.Bind("AzureAD", options);
options.ResponseType = "code id_token";
}
.EnableTokenAcquisitionToCallDownstreamApi()
.AddDistributedTokenCaches();
Expected behavior The library should respect my choice of ResponseType of “code id_token” or let me override it while configuring TokenAcquisition.
Actual behavior The library overrides OpenIdConnectOptions.ResponseType with “code” and this prevents me from using the advantages of a hybrid flow.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Microsoft identity platform and OAuth 2.0 authorization ...
In the hybrid flow, this error signals that you must enable the ID token implicit grant setting on the client app registration. The...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @vvolodin. We’ll look at this:
As a workaround, I think you can override it by adding (after this code):
@vvolodin added documentation