@muze-nl/metro-oidc 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.js CHANGED
@@ -1124,6 +1124,7 @@
1124
1124
  search.client_secret = oauth2.client_secret;
1125
1125
  }
1126
1126
  if (oauth2.code_verifier) {
1127
+ options.tokens.set("code_verifier", oauth2.code_verifier);
1127
1128
  search.code_challenge = await generateCodeChallenge(oauth2.code_verifier);
1128
1129
  search.code_challenge_method = "S256";
1129
1130
  }
@@ -1148,8 +1149,9 @@
1148
1149
  grant_type: grant_type || oauth2.grant_type,
1149
1150
  client_id: oauth2.client_id
1150
1151
  };
1151
- if (oauth2.code_verifier) {
1152
- params2.code_verifier = oauth2.code_verifier;
1152
+ const code_verifier = options.tokens.get("code_verifier");
1153
+ if (code_verifier) {
1154
+ params2.code_verifier = code_verifier;
1153
1155
  }
1154
1156
  if (oauth2.client_secret) {
1155
1157
  params2.client_secret = oauth2.client_secret;