Discussions

Ask a Question
Back to All

moneyhub new sdk config

with '@mft/moneyhub-api-client' package.. we set the auth with :
var moneyhub = await Moneyhub(moneyhubConfig)
.//proceed with moneyhub.actions like getAccount

Now with the new @api/moneyhubapi
there is no documentation how to configure the auth..(except for the bearer token/ accesscode /username:password)

now we don't use any of those. This is how our config looks like:

{
  resourceServerUrl: 'https://api.moneyhub.co.uk/v3',
  identityServiceUrl: 'https://identity.moneyhub.co.uk',
  options: {
    // optional
    timeout: 600000,
  },
  client: {
    client_id: client_id_full_jwt,
    client_secret: client_secret_full_jwt,
    id_token_signed_response_alg: 'RS256',
    token_endpoint_auth_method: 'private_key_jwt',
    request_object_signing_alg: 'RS256',
    redirect_uri: 'https://redirect.mysite.com',
    response_type: 'code id_token',
    keys: [
      {
        p:
          'xxx',
        kty: 'RSA',
        q:
          'xxx',
        d:
          'xxx',
        e: 'xx',
        use: 'xxx',
        kid: 'xxxx',
        qi:
          'xxx',
        dp:
          'xxx',
        alg: 'RS256',
        dq:
          'xxx',
        n:
          'xxx',
      },
    ],
  },
}

All the requests that I make with the new sdk.. is rejected with a 403.. kindly help how to authenticate it using my current config