-
Notifications
You must be signed in to change notification settings - Fork 291
Description
Hi,
When using a GitHub Standalone instance, the integration with Github App is not working, getting -
undefined
If .env file is modified ...
After reading this doc - where it says:
There is one case where an OAuth app is preferred over a GitHub App. If your app needs to access enterprise-level resources such as the enterprise object itself, you should use an OAuth app because a GitHub App cannot yet be given permissions against an enterprise.
I was able to fix the issue by:
- Created a OAuth App instead.
- Add the scope I would like to get access to as part of the authorization request - server.mjs
res.redirect(`https://github.com/login/oauth/authorize?client_id=${process.env.GITHUB_CLIENT_ID}&redirect_uri=${redirectUrl}&state=${req.session.state}&scope=user%20read:org%20read:enterprise%20copilot:manage_billing%20read:enterprise_billing`);
By doing the following I was able to read the metrics after performing GitHub login.
I am opening this as an issue as maybe there is better way to fix this.
Thanks
Metadata
Metadata
Assignees
Labels
No labels