forked from jmandel/fhir-js-client
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manually apply microsoft-healthcare-madison@d95c3b5
- Loading branch information
1 parent
f3a3c85
commit 3ad1d83
Showing
2 changed files
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -324,15 +324,14 @@ export async function authorize( | |
redirectParams.push("launch=" + encodeURIComponent(launch)); | ||
} | ||
|
||
if ((pkceMode === 'required') && (!(extensions.codeChallengeMethods.includes('S256')))) { | ||
if (pkceMode === 'required' && !extensions.codeChallengeMethods.includes('S256')) { | ||
throw new Error("Required PKCE code challenge method (`S256`) was not found."); | ||
} | ||
|
||
if ((pkceMode !== 'disabled') && (extensions.codeChallengeMethods.includes('S256'))) { | ||
if ((pkceMode === "unsafeV1" || pkceMode !== 'disabled') && extensions.codeChallengeMethods.includes('S256')) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
vlad-ignatov
Author
Collaborator
|
||
let codes = await security.generatePKCEChallenge() | ||
Object.assign(state, codes); | ||
await storage.set(stateKey, state); // note that the challenge is ALREADY encoded properly | ||
|
||
await storage.set(stateKey, state); // note that the challenge is ALREADY encoded properly | ||
redirectParams.push("code_challenge=" + state.codeChallenge); | ||
redirectParams.push("code_challenge_method=S256"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi @vlad-ignatov , this line isn't treating the
unsafeV1
quite right. Can we do something like this for this line?I wrote up this table on what I think the desired behavior is (Error, Skip PKCE or Include PKCE), which the above + the required/supported check should cover. The latter 4 columns are running the logic above and showing the result (I realize there are duplicate columns):