Skip to content

Commit c66c159

Browse files
committed
Add GitHub OAuth integration and token management
Introduces GitHub OAuth flow for user-to-server tokens, including endpoints for handling OAuth callbacks and exchanging codes for tokens. Updates the GitHub service to support OAuth code exchange, token validation, and refresh, and adds required environment variables for client ID and secret. Updates dependencies to support new OAuth methods and expands the project model to store task manager configuration.
1 parent 96ad7b1 commit c66c159

File tree

6 files changed

+2100
-2199
lines changed

6 files changed

+2100
-2199
lines changed

.env.sample

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ GITHUB_WEBHOOK_SECRET=623f6ed30b1f762803149893263a95cc2687fe3ce5a9f30648dcbf2571
100100
# Id of GitHub app
101101
GITHUB_APP_ID=1234567
102102

103+
# Client ID of GitHub app
104+
GITHUB_APP_CLIENT_ID=Iv23li65HEIkWZXsm6qO
105+
103106
# GitHub App slug/name. Used to generate installation URLs
104107
GITHUB_APP_SLUG=hawk-tracker-app
105108

@@ -132,3 +135,5 @@ apxW9AHmx4aVRrmcIPq/BlMc6lGIgx2IwMBvJVpHVeUOUMAfNMRZV0XjY715xEyW
132135
U/uCfmCh8rfyQ75rthD4mGzNmHBpWrP/bD3c/vdj0wAxFXVyR5bG/Q==
133136
-----END RSA PRIVATE KEY-----"
134137

138+
# Generated in GitHub app settings
139+
GITHUB_APP_CLIENT_SECRET=0663e20d484234e17b0871c1f070581739c14e04

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"eslint": "^6.7.2",
2828
"eslint-config-codex": "1.2.4",
2929
"eslint-plugin-import": "^2.19.1",
30-
"jest": "^27.6.0",
30+
"jest": "^30.2.0",
3131
"mongodb-memory-server": "^6.6.1",
3232
"nodemon": "^2.0.2",
3333
"redis-mock": "^0.56.3",
@@ -43,9 +43,10 @@
4343
"@graphql-tools/schema": "^8.5.1",
4444
"@graphql-tools/utils": "^8.9.0",
4545
"@hawk.so/nodejs": "^3.1.1",
46-
"@hawk.so/types": "^0.4.2",
46+
"@hawk.so/types": "^0.5.6",
4747
"@n1ru4l/json-patch-plus": "^0.2.0",
4848
"@node-saml/node-saml": "^5.0.1",
49+
"@octokit/oauth-methods": "^4.0.0",
4950
"@octokit/rest": "^22.0.1",
5051
"@octokit/types": "^16.0.0",
5152
"@types/amqp-connection-manager": "^2.0.4",

0 commit comments

Comments
 (0)