Allow false
to be set for pkceMethod
option (#28347)
Closes #28335 Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
3fffc5182e
commit
9651af4a1c
1 changed files with 4 additions and 3 deletions
|
@ -132,10 +132,11 @@ function Keycloak (config) {
|
||||||
kc.silentCheckSsoFallback = true;
|
kc.silentCheckSsoFallback = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (initOptions.pkceMethod) {
|
if (typeof initOptions.pkceMethod !== "undefined") {
|
||||||
if (initOptions.pkceMethod !== "S256") {
|
if (initOptions.pkceMethod !== "S256" && initOptions.pkceMethod !== false) {
|
||||||
throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${initOptions.pkceMethod}'.`);
|
throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${initOptions.pkceMethod}.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
kc.pkceMethod = initOptions.pkceMethod;
|
kc.pkceMethod = initOptions.pkceMethod;
|
||||||
} else {
|
} else {
|
||||||
kc.pkceMethod = "S256";
|
kc.pkceMethod = "S256";
|
||||||
|
|
Loading…
Reference in a new issue