Skip to content

Authorisation Example Error #87

@doonetheprune

Description

@doonetheprune

Following this example on your Readme.md,

const url = await moneyhub.getAuthorizeUrl({
  scope: "openid bank-id-scope other-data-scopes",
  state: " your state value", // optional
  nonce: "your nonce value", //optional
  claims: claimsObject, // optional
  permissions: ["ReadBeneficiariesDetail"], // optional - set of extra permissions to set for auth URL
  permissionsAction: "replace" // optional - replace default consent permissions. Defaults to "add"
  expirationDateTime: "2022-09-01T00:00:00.000Z", // optional
  transactionFromDateTime: "2020-09-01T00:00:00.000Z", // optional,
  enableAsync: false, // optional
});

// Default claims if none are provided
const defaultClaims = {
  id_token: {
    sub: {
      essential: true,
    },
    "mh:con_id": {
      essential: true,
    },
  },
};

I get this error

URL: OPError: invalid_request_object (the preregistered alg must be used in request or request_uri)
2024-07-08 15:57:23 [1]     at processResponse (/app/node_modules/openid-client/lib/helpers/process_response.js:38:13)
2024-07-08 15:57:23 [1]     at Client.pushedAuthorizationRequest (/app/node_modules/openid-client/lib/client.js:1589:26)
2024-07-08 15:57:23 [1]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-07-08 15:57:23 [1]     at async getAuthorizationUrlFromParams (/app/node_modules/@mft/moneyhub-api-client/dist/get-auth-urls.js:70:45) {
2024-07-08 15:57:23 [1]   error: 'invalid_request_object',
2024-07-08 15:57:23 [1]   error_description: 'the preregistered alg must be used in request or request_uri'

I have created the client according to the config.js in the example dir

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions