You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.
I can successfully sign a JW with private key locallay running serverless-offline, however when I push up to Lambda, I get the following:
Error: ENOENT: no such file or directory, open 'private.key'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Object.r.createToken (/var/task/auth/users/post/_serverless_handler.js:1:1561)
at /var/task/auth/users/post/_serverless_handler.js:1:2912
at /var/task/auth/users/post/_serverless_handler.js:1:1406
at /var/task/auth/users/post/_serverless_handler.js:5:3758
at f (/var/task/auth/users/post/_serverless_handler.js:5:9015)
at c.respond (/var/task/auth/users/post/_serverless_handler.js:5:11093)
at c.responseHandler (/var/task/auth/users/post/_serverless_handler.js:5:12239)
Now I know the code works, its more the path I guess on where to find the key. In this scenario, I placed the key under /auth/lib/* and the reference is for the key is called in the token.js in the same folder via:
var secretTokenPriv = fs.readFileSync('private.key'); // get private key
Do you have any ideas? Im stuck and have been rattling my brain for two days with different combinations ect and cannot seem to get the file to be found.
Thanks
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I can successfully sign a JW with private key locallay running serverless-offline, however when I push up to Lambda, I get the following:
Error: ENOENT: no such file or directory, open 'private.key'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Object.r.createToken (/var/task/auth/users/post/_serverless_handler.js:1:1561)
at /var/task/auth/users/post/_serverless_handler.js:1:2912
at /var/task/auth/users/post/_serverless_handler.js:1:1406
at /var/task/auth/users/post/_serverless_handler.js:5:3758
at f (/var/task/auth/users/post/_serverless_handler.js:5:9015)
at c.respond (/var/task/auth/users/post/_serverless_handler.js:5:11093)
at c.responseHandler (/var/task/auth/users/post/_serverless_handler.js:5:12239)
Now I know the code works, its more the path I guess on where to find the key. In this scenario, I placed the key under /auth/lib/* and the reference is for the key is called in the token.js in the same folder via:
var secretTokenPriv = fs.readFileSync('private.key'); // get private key
Do you have any ideas? Im stuck and have been rattling my brain for two days with different combinations ect and cannot seem to get the file to be found.
Thanks
The text was updated successfully, but these errors were encountered: