idm-samples
idm-samples copied to clipboard
problem in using api to generate token in nodejs
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?