azure-functions-auth
azure-functions-auth copied to clipboard
error:0909006C:PEM routines:get_name:no start line
I'm using azure-functions-auth module with 1.4.2 latest version.
This is my code:
const validateJwt = require('azure-functions-auth')({
clientId: '<myClientId>',
clientSecret: '<myClientSecret>',
domain: 'https://MyDomain.auth0.com',
algorithms: ['RS256'],
});
const main = (context, req) => {
context.log('token is valid. (you shouldn\'t log like that in production code)')
return new Promise(resolve => {
resolve('the function will return this exact string as body with a status code of 200')
}).then(asyncResult =>{
return asyncResult
})
}
module.exports = validateJwt(main, true)
I'm using a machine to machine auth0 communication, when I call my azure function with a valid JWT TOKEN (validated with jwt.io) I'm always getting this error:
{
"message": "error:0909006C:PEM routines:get_name:no start line"
}
I'm not sure but I think it's related to the encryption part for the RSA algorithme.
Thanks for your feedback and ideas to how handle this error.
Did you solve this issue?how?
I used an other solution instead of azure-functions-auth package
did you used different package?
I used the native packages for node and auth0 and set up the configuration with my azure function