-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
createNodeMiddleware(app) requires oauth.clientId and oauth.clientSecret #2211
Comments
Was a fix for this found? I'm having the same error now |
I just added the const ghApp = new App({
appId: process.env.GITHUB_APP_ID,
privateKey: process.env.GITHUB_PRIVATE_KEY,
webhooks: {
secret: process.env.GITHUB_WEBHOOK_SECRET,
},
oauth: { clientId: null!, clientSecret: null! },
}); |
I agree that both the You should be able to just set |
I'm not sure exactly what the difference is but there's another import of
I was unable to get the |
|
When I set secret to
If I set the secret, I get the following error when calling the webhook: {"error":"Error: [@octokit/webhooks] signature does not match event payload and secret"} So there is currently no way for me to call a webhook, Im using GHES 3.13.5 |
If you receive webhooks, you must set a webhook secret in your GitHub App configuration and configure your code accordingly. It's security best practice and Octokit enforces it. We only discuss not to set any |
I understand and agree that it should be best practice, but I cannot have webhook secrets because of the error I get (see #2211 (comment)). Was there a breaking change which is not supported by GHES 3.13.5 regarding webhook secrets? |
Please avoid duplicates
Reproducible test case
Please select the environment(s) that are relevant to your bug report
Version
[email protected]
What happened?
I copied the code from the octokit.js readme.md wanting to test github webhooks. In the example code oauth.clientId and oauth.clientSecret are not set. Also in the octokit/app.js Constructor oauth.clientId and oauth.clientSecret are not required.
When I try to run my code, I get the error:
throw new Error("[@octokit/app] oauth.clientId / oauth.clientSecret options are not set");
I have to say though, in octokit/app.js Usage oauth.clientId, oauth.clientSecret are provided in the code example.
Is this a documentation error or a code bug?
Would you be interested in contributing a fix?
The text was updated successfully, but these errors were encountered: