Whats the correct way to call acceptOAuth2LoginReq...
# talk-hydra
s
Whats the correct way to call acceptOAuth2LoginRequest from the OAuth2Api in https://www.npmjs.com/package/@ory/hydra-client?activeTab=code ? I can't seem to get it to work. I tried the following:
Copy code
acceptOAuth2LoginRequest(login_challenge, {subject: user.user.address});  // This got loginChallenge undefined error from NodeJS.
acceptOAuth2LoginRequest({loginChallenge: login_challenge}, {subject: user.user.address}); // This got undefined subject error from hydra.
Resolved this with the following syntax:
var accpt_req = await hydraAdmin.acceptOAuth2LoginRequest({loginChallenge: login_challenge, acceptOAuth2LoginRequest: {'subject': address}});