Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorisation Example Error #87

Open
doonetheprune opened this issue Jul 8, 2024 · 0 comments
Open

Authorisation Example Error #87

doonetheprune opened this issue Jul 8, 2024 · 0 comments

Comments

@doonetheprune
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant