hokify / erste-bank-client

A node-js module for erste bank to retrieve transactions.
14 stars 0 forks source link

Unhandled rejection Error: no auth mechanism defined #3

Open tyriis opened 5 years ago

tyriis commented 5 years ago

Hi, i got the following error when I try to execute the example code provided, maybe something has changed?

Unhandled rejection Error: no auth mechanism defined at Auth.onRequest (node_modules/request/lib/auth.js:132:32) at Request.auth (node_modules/request/request.js:1347:14) at Request.init (node_modules/request/request.js:378:10) at new Request (node_modules/request/request.js:127:8) at request (node_modules/request/index.js:53:10) at Function.get (node_modules/request/index.js:61:12) at Function.tryCatcher (node_modules/bluebird/js/release/util.js:16:23) at Function.ret [as getAsync] (eval at makeNodePromisifiedEval (node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:14:23) at module.exports.ErsteBankClient.getAccountId (node_modules/erste-bank-client/lib/erstebank.js:115:24) at Object.<anonymous> (index.js:12:5) at Module._compile (internal/modules/cjs/loader.js:816:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32) at Function.Module._load (internal/modules/cjs/loader.js:620:12) at Function.Module.runMain (internal/modules/cjs/loader.js:877:12) at internal/main/run_main_module.js:21:11

zaszlo commented 4 years ago

Same thing, I have provided a password, user name and iban but not auth_id as I didn't get that yet.

Unhandled rejection Error: no auth mechanism defined
    at Auth.onRequest (/mnt/c/git/george/node_modules/request/lib/auth.js:132:32)
    at Request.auth (/mnt/c/git/george/node_modules/request/request.js:1341:14)
    at Request.init (/mnt/c/git/george/node_modules/request/request.js:378:10)
    at new Request (/mnt/c/git/george/node_modules/request/request.js:127:8)
    at request (/mnt/c/git/george/node_modules/request/index.js:53:10)
    at Function.get (/mnt/c/git/george/node_modules/request/index.js:61:12)
    at Function.tryCatcher (/mnt/c/git/george/node_modules/bluebird/js/release/util.js:16:23)
    at Function.ret [as getAsync] (eval at makeNodePromisifiedEval (/mnt/c/git/george/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:14:23)
    at module.exports.ErsteBankClient.getAccountId (/mnt/c/git/george/node_modules/erste-bank-client/lib/erstebank.js:115:24)
    at module.exports.ErsteBankClient.getDataExport (/mnt/c/git/george/node_modules/erste-bank-client/lib/erstebank.js:159:17)
    at Object.<anonymous> (/mnt/c/git/george/log-extras.js:12:5)
    at Module._compile (module.js:662:30)
    at Object.Module._extensions..js (module.js:673:10)
    at Module.load (module.js:575:32)
    at tryModuleLoad (module.js:515:12)
    at Function.Module._load (module.js:507:3)
simllll commented 4 years ago

Maybe related to #2 Update for sIdentity 2fa?

zaszlo commented 4 years ago

Have looked into the code and the problem rises because the access token evaluates to undefined, the calls to get the access token are not even invoked, did a call to it, but is async, so the token arrives later on... and in the end I have more basic problem, I'm not after the austrian open banking api... which works quite differently, can't tell how, but no rsa here. Like 5 hash keys in the cookie with a correlation id... No docs as I see, so I will just try to do the auth part with phantomjs maybe...