idm-samples icon indicating copy to clipboard operation
idm-samples copied to clipboard

problem in using api to generate token in nodejs

Open moblizeit opened this issue 5 years ago • 0 comments

We are using serverless functions and the code looks like below

exports.generate_idcs_auth_code = functions.https.onRequest(async (req, res) => { try{
const am = new IdcsAuthenticationManager(oracleIdcsConfig); console.log("am is:", am) const rsp = await am.getAuthorizationCodeUrl(oracleIdcsConfig.redirectURL, oracleIdcsConfig.scope, "1234", "code") console.log("Response is::::", rsp) }catch(err){ console.log("Failed to generate auth url:", err) }

})

this code fails with error:

Error: EROFS: read-only file system, open 'error.log'

I have no idea why it is trying to access file system first of all? and it does then why can't i specify what base directory to use?

moblizeit avatar Jul 03 '20 20:07 moblizeit