Skip to content

Commit

Permalink
chore: investigate req opts not properly filled
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed Jan 25, 2024
1 parent 1390a43 commit 0bbb58c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/client/lib/AuthorizationCodeClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ export const createAuthorizationRequestUrl = async ({
console.log(`QUERY obj: ` + JSON.stringify(queryObj, null, 2));
const url = convertJsonToURI(queryObj, {
baseUrl: endpointMetadata.authorization_endpoint,
uriTypeProperties: ['request_uri', 'redirect_uri', 'scope', 'authorization_details', 'issuer_state'],
uriTypeProperties: ['client_id', 'request_uri', 'redirect_uri', 'scope', /*'authorization_details', */'issuer_state'],
arrayTypeProperties: ['authorization_details'],
mode: JsonURIMode.X_FORM_WWW_URLENCODED,
// We do not add the version here, as this always needs to be form encoded
});
Expand Down Expand Up @@ -140,7 +141,7 @@ const handleLocations = (endpointMetadata: EndpointMetadataResult, authorization
if (authorizationDetails && (endpointMetadata.credentialIssuerMetadata?.authorization_server || endpointMetadata.authorization_endpoint)) {
if (authorizationDetails.locations) {
if (Array.isArray(authorizationDetails.locations)) {
(authorizationDetails.locations as string[]).push(endpointMetadata.issuer);
authorizationDetails.locations.push(endpointMetadata.issuer);
} else {
authorizationDetails.locations = [authorizationDetails.locations as string, endpointMetadata.issuer];
}
Expand Down

0 comments on commit 0bbb58c

Please sign in to comment.