@acmekit/auth-github 2.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ ## Testing
2
+
3
+ In order to manually test the flow, you can do the following:
4
+
5
+ 1. Register a Github App - https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app
6
+ 2. Go to the app, fetch the clientId and create a new clientSecret
7
+ 3. Replace the values in the test with your credentials
8
+ 4. Remove the `server.listen()` call
9
+ 5. Run the tests, get the `location` value from the `authenticate` test, open the browser
10
+ 6. Once redirected, copy the `code` param from the URL, and add it in one of the `callback` success tests
11
+ 7. Once you run the tests, you should get back an access token and so on.
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@acmekit/types").ModuleProviderExports;
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAKA,wBAEE"}
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("@acmekit/framework/utils");
4
+ const github_1 = require("./services/github");
5
+ const services = [github_1.GithubAuthService];
6
+ exports.default = (0, utils_1.ModuleProvider)(utils_1.Modules.AUTH, {
7
+ services,
8
+ });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,oDAAkE;AAClE,8CAAqD;AAErD,MAAM,QAAQ,GAAG,CAAC,0BAAiB,CAAC,CAAA;AAEpC,kBAAe,IAAA,sBAAc,EAAC,eAAO,CAAC,IAAI,EAAE;IAC1C,QAAQ;CACT,CAAC,CAAA"}
@@ -0,0 +1,35 @@
1
+ import { AuthenticationInput, AuthenticationResponse, AuthIdentityProviderService, GithubAuthProviderOptions, Logger } from "@acmekit/framework/types";
2
+ import { AbstractAuthModuleProvider } from "@acmekit/framework/utils";
3
+ type InjectedDependencies = {
4
+ logger: Logger;
5
+ };
6
+ interface LocalServiceConfig extends GithubAuthProviderOptions {
7
+ }
8
+ export declare class GithubAuthService extends AbstractAuthModuleProvider {
9
+ static identifier: string;
10
+ static DISPLAY_NAME: string;
11
+ protected config_: LocalServiceConfig;
12
+ protected logger_: Logger;
13
+ static validateOptions(options: GithubAuthProviderOptions): void;
14
+ constructor({ logger }: InjectedDependencies, options: GithubAuthProviderOptions);
15
+ register(_: any): Promise<AuthenticationResponse>;
16
+ authenticate(req: AuthenticationInput, authIdentityService: AuthIdentityProviderService): Promise<AuthenticationResponse>;
17
+ validateCallback(req: AuthenticationInput, authIdentityService: AuthIdentityProviderService): Promise<AuthenticationResponse>;
18
+ upsert_(providerMetadata: {
19
+ access_token: string;
20
+ refresh_token: string;
21
+ access_token_expires_at: string;
22
+ refresh_token_expires_at: string;
23
+ }, authIdentityService: AuthIdentityProviderService): Promise<{
24
+ success: boolean;
25
+ error: any;
26
+ authIdentity?: undefined;
27
+ } | {
28
+ success: boolean;
29
+ authIdentity: any;
30
+ error?: undefined;
31
+ }>;
32
+ private getRedirect;
33
+ }
34
+ export {};
35
+ //# sourceMappingURL=github.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/services/github.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,MAAM,EACP,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,0BAA0B,EAE3B,MAAM,0BAA0B,CAAA;AAEjC,KAAK,oBAAoB,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,UAAU,kBAAmB,SAAQ,yBAAyB;CAAG;AAEjE,qBAAa,iBAAkB,SAAQ,0BAA0B;IAC/D,MAAM,CAAC,UAAU,SAAW;IAC5B,MAAM,CAAC,YAAY,SAA0B;IAE7C,SAAS,CAAC,OAAO,EAAE,kBAAkB,CAAA;IACrC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAA;IAEzB,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,yBAAyB;gBAevD,EAAE,MAAM,EAAE,EAAE,oBAAoB,EAChC,OAAO,EAAE,yBAAyB;IAQ9B,QAAQ,CAAC,CAAC,KAAA,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAO5C,YAAY,CAChB,GAAG,EAAE,mBAAmB,EACxB,mBAAmB,EAAE,2BAA2B,GAC/C,OAAO,CAAC,sBAAsB,CAAC;IAoB5B,gBAAgB,CACpB,GAAG,EAAE,mBAAmB,EACxB,mBAAmB,EAAE,2BAA2B,GAC/C,OAAO,CAAC,sBAAsB,CAAC;IAsE5B,OAAO,CACX,gBAAgB,EAAE;QAChB,YAAY,EAAE,MAAM,CAAA;QACpB,aAAa,EAAE,MAAM,CAAA;QACrB,uBAAuB,EAAE,MAAM,CAAA;QAC/B,wBAAwB,EAAE,MAAM,CAAA;KACjC,EACD,mBAAmB,EAAE,2BAA2B;;;;;;;;;IAkDlD,OAAO,CAAC,WAAW;CASpB"}
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GithubAuthService = void 0;
7
+ const crypto_1 = __importDefault(require("crypto"));
8
+ const utils_1 = require("@acmekit/framework/utils");
9
+ class GithubAuthService extends utils_1.AbstractAuthModuleProvider {
10
+ static validateOptions(options) {
11
+ if (!options.clientId) {
12
+ throw new Error("Github clientId is required");
13
+ }
14
+ if (!options.clientSecret) {
15
+ throw new Error("Github clientSecret is required");
16
+ }
17
+ if (!options.callbackUrl) {
18
+ throw new Error("Github callbackUrl is required");
19
+ }
20
+ }
21
+ constructor({ logger }, options) {
22
+ // @ts-ignore
23
+ super(...arguments);
24
+ this.config_ = options;
25
+ this.logger_ = logger;
26
+ }
27
+ async register(_) {
28
+ throw new utils_1.AcmeKitError(utils_1.AcmeKitError.Types.NOT_ALLOWED, "Github does not support registration. Use method `authenticate` instead.");
29
+ }
30
+ async authenticate(req, authIdentityService) {
31
+ const query = req.query ?? {};
32
+ const body = req.body ?? {};
33
+ if (query.error) {
34
+ return {
35
+ success: false,
36
+ error: `${query.error_description}, read more at: ${query.error_uri}`,
37
+ };
38
+ }
39
+ const stateKey = crypto_1.default.randomBytes(32).toString("hex");
40
+ const state = {
41
+ callback_url: body?.callback_url ?? this.config_.callbackUrl,
42
+ };
43
+ await authIdentityService.setState(stateKey, state);
44
+ return this.getRedirect(this.config_.clientId, state.callback_url, stateKey);
45
+ }
46
+ async validateCallback(req, authIdentityService) {
47
+ const query = req.query ?? {};
48
+ const body = req.body ?? {};
49
+ if (query.error) {
50
+ return {
51
+ success: false,
52
+ error: `${query.error_description}, read more at: ${query.error_uri}`,
53
+ };
54
+ }
55
+ const code = query?.code ?? body?.code;
56
+ if (!code) {
57
+ return { success: false, error: "No code provided" };
58
+ }
59
+ const state = await authIdentityService.getState(query?.state);
60
+ if (!state) {
61
+ return { success: false, error: "No state provided, or session expired" };
62
+ }
63
+ const params = `client_id=${this.config_.clientId}&client_secret=${this.config_.clientSecret}&code=${code}&redirect_uri=${state.callback_url}`;
64
+ const exchangeTokenUrl = new URL(`https://github.com/login/oauth/access_token?${params}`);
65
+ try {
66
+ const response = await fetch(exchangeTokenUrl.toString(), {
67
+ method: "POST",
68
+ headers: {
69
+ Accept: "application/json",
70
+ },
71
+ }).then((r) => {
72
+ if (!r.ok) {
73
+ throw new utils_1.AcmeKitError(utils_1.AcmeKitError.Types.INVALID_DATA, `Could not exchange token, ${r.status}, ${r.statusText}`);
74
+ }
75
+ return r.json();
76
+ });
77
+ const providerMetadata = {
78
+ access_token: response.access_token,
79
+ refresh_token: response.refresh_token,
80
+ // The response is in seconds
81
+ access_token_expires_at: new Date(Date.now() + response.expires_in * 1000).toISOString(),
82
+ refresh_token_expires_at: new Date(Date.now() + response.refresh_token_expires_in * 1000).toISOString(),
83
+ };
84
+ const { authIdentity, success } = await this.upsert_(providerMetadata, authIdentityService);
85
+ return {
86
+ success,
87
+ authIdentity,
88
+ };
89
+ }
90
+ catch (error) {
91
+ return { success: false, error: error.message };
92
+ }
93
+ }
94
+ async upsert_(providerMetadata, authIdentityService) {
95
+ if (!providerMetadata?.access_token) {
96
+ return { success: false, error: "No access token found" };
97
+ }
98
+ const user = await fetch("https://api.github.com/user", {
99
+ headers: {
100
+ Accept: "application/json",
101
+ Authorization: `Bearer ${providerMetadata.access_token}`,
102
+ },
103
+ }).then((r) => r.json());
104
+ const entity_id = user.id.toString();
105
+ const userMetadata = {
106
+ profile_url: user.url,
107
+ avatar: user.avatar_url,
108
+ email: user.email,
109
+ name: user.name,
110
+ company: user.company,
111
+ two_factor_authentication: user.two_factor_authentication ?? false,
112
+ };
113
+ let authIdentity;
114
+ try {
115
+ // Update throws if auth identity not found
116
+ authIdentity = await authIdentityService.update(entity_id, {
117
+ provider_metadata: providerMetadata,
118
+ user_metadata: userMetadata,
119
+ });
120
+ }
121
+ catch (error) {
122
+ if (error.type === utils_1.AcmeKitError.Types.NOT_FOUND) {
123
+ const createdAuthIdentity = await authIdentityService.create({
124
+ entity_id,
125
+ user_metadata: userMetadata,
126
+ provider_metadata: providerMetadata,
127
+ });
128
+ authIdentity = createdAuthIdentity;
129
+ }
130
+ else {
131
+ return { success: false, error: error.message };
132
+ }
133
+ }
134
+ return {
135
+ success: true,
136
+ authIdentity,
137
+ };
138
+ }
139
+ getRedirect(clientId, callbackUrl, stateKey) {
140
+ const authUrl = new URL(`https://github.com/login/oauth/authorize`);
141
+ authUrl.searchParams.set("redirect_uri", callbackUrl);
142
+ authUrl.searchParams.set("client_id", clientId);
143
+ authUrl.searchParams.set("response_type", "code");
144
+ authUrl.searchParams.set("state", stateKey);
145
+ return { success: true, location: authUrl.toString() };
146
+ }
147
+ }
148
+ exports.GithubAuthService = GithubAuthService;
149
+ GithubAuthService.identifier = "github";
150
+ GithubAuthService.DISPLAY_NAME = "Github Authentication";
151
+ //# sourceMappingURL=github.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github.js","sourceRoot":"","sources":["../../src/services/github.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA2B;AAQ3B,oDAGiC;AAQjC,MAAa,iBAAkB,SAAQ,kCAA0B;IAO/D,MAAM,CAAC,eAAe,CAAC,OAAkC;QACvD,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAA;QAChD,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;QACpD,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;QACnD,CAAC;IACH,CAAC;IAED,YACE,EAAE,MAAM,EAAwB,EAChC,OAAkC;QAElC,aAAa;QACb,KAAK,CAAC,GAAG,SAAS,CAAC,CAAA;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;IACvB,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,CAAC;QACd,MAAM,IAAI,oBAAY,CACpB,oBAAY,CAAC,KAAK,CAAC,WAAW,EAC9B,0EAA0E,CAC3E,CAAA;IACH,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,GAAwB,EACxB,mBAAgD;QAEhD,MAAM,KAAK,GAA2B,GAAG,CAAC,KAAK,IAAI,EAAE,CAAA;QACrD,MAAM,IAAI,GAA2B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAA;QAEnD,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YACh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"description": "Github OAuth authentication provider for AcmeKit",
5
+ "main": "dist/index.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/acmekit/acmekit",
9
+ "directory": "packages/modules/providers/auth-github"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "!dist/**/__tests__",
14
+ "!dist/**/__mocks__",
15
+ "!dist/**/__fixtures__"
16
+ ],
17
+ "engines": {
18
+ "node": ">=20"
19
+ },
20
+ "author": "AcmeKit",
21
+ "license": "MIT",
22
+ "scripts": {
23
+ "test": "../../../../node_modules/.bin/jest --passWithNoTests src",
24
+ "test:integration": "../../../../node_modules/.bin/jest --passWithNoTests --forceExit --testPathPattern=\"integration-tests/__tests__/.*\\.spec\\.ts\"",
25
+ "build": "yarn run -T rimraf dist && yarn run -T tsc --build",
26
+ "watch": "yarn run -T tsc --watch"
27
+ },
28
+ "devDependencies": {
29
+ "@acmekit/framework": "2.13.1"
30
+ },
31
+ "peerDependencies": {
32
+ "@acmekit/framework": "2.13.1"
33
+ },
34
+ "keywords": [
35
+ "acmekit-provider",
36
+ "acmekit-provider-auth-github"
37
+ ]
38
+ }