I'm unable to authenticate as an app using Octokit/rest and the documentation as failed me...
Here's my routine for authenticating:
async function getGithub({payload}) {
const auth = createAppAuth({
id: parseInt(process.env.APP_ID, 10),
privateKey: getPrivateKey()
})
const installationAuth = await auth({
type: 'installation',
installationId: payload.installation.id,
})
return new Octokit(installationAuth)
}
Could anybody point me in the right direction?
When I make a request with the client, I just get a 404. I know the repo exists and Github's docs point out that unauthorised requests may result in a 404 if the client has no access.