From adc81c94dea5eface9d725cad59c9c10f367a00c Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Mon, 9 Mar 2020 19:54:51 +0100 Subject: [PATCH] [Blazor] Fix default value for response type (#19706) --- .../src/Interop/AuthenticationService.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/Interop/AuthenticationService.ts b/src/Components/WebAssembly/WebAssembly.Authentication/src/Interop/AuthenticationService.ts index 7a95395af1..a0f6a9b300 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/Interop/AuthenticationService.ts +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/Interop/AuthenticationService.ts @@ -309,6 +309,11 @@ export class AuthenticationService { settings.scope = settings.defaultScopes.join(' '); } + if (settings.response_type === null) { + // If the response type is not set, it gets serialized as null. OIDC-client behaves differently than when the value is undefined, so we explicitly check for a null value and remove the property instead. + delete settings.response_type; + } + finalSettings = settings; }