@happyvertical/auth 0.80.0 → 0.80.2
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/dist/chunks/cognito-thQmKf7L.js +124 -0
- package/dist/chunks/cognito-thQmKf7L.js.map +1 -0
- package/dist/chunks/decode_jwt-BvtACpi_.js +1183 -0
- package/dist/chunks/decode_jwt-BvtACpi_.js.map +1 -0
- package/dist/chunks/errors-RgVH84_1.js +343 -0
- package/dist/chunks/errors-RgVH84_1.js.map +1 -0
- package/dist/chunks/github-uNnnVjFZ.js +311 -0
- package/dist/chunks/github-uNnnVjFZ.js.map +1 -0
- package/dist/chunks/google-C_p8rExJ.js +374 -0
- package/dist/chunks/google-C_p8rExJ.js.map +1 -0
- package/dist/chunks/kanidm-DTcc6ufi.js +567 -0
- package/dist/chunks/kanidm-DTcc6ufi.js.map +1 -0
- package/dist/chunks/keycloak-CzPHgI2z.js +632 -0
- package/dist/chunks/keycloak-CzPHgI2z.js.map +1 -0
- package/dist/chunks/nostr-zrMaYMU-.js +141 -0
- package/dist/chunks/nostr-zrMaYMU-.js.map +1 -0
- package/dist/cli/claude-context.js +17 -17
- package/dist/cli/claude-context.js.map +1 -1
- package/dist/index.js +204 -486
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/chunks/cognito-dmypylFX.js +0 -128
- package/dist/chunks/cognito-dmypylFX.js.map +0 -1
- package/dist/chunks/decode_jwt-D2OK1b8a.js +0 -1395
- package/dist/chunks/decode_jwt-D2OK1b8a.js.map +0 -1
- package/dist/chunks/github-NSZp5tVm.js +0 -413
- package/dist/chunks/github-NSZp5tVm.js.map +0 -1
- package/dist/chunks/google-HXk2ctYR.js +0 -483
- package/dist/chunks/google-HXk2ctYR.js.map +0 -1
- package/dist/chunks/index-BpsMhFXS.js +0 -151
- package/dist/chunks/index-BpsMhFXS.js.map +0 -1
- package/dist/chunks/kanidm-hkw-YPVF.js +0 -747
- package/dist/chunks/kanidm-hkw-YPVF.js.map +0 -1
- package/dist/chunks/keycloak-t6JEUeOz.js +0 -871
- package/dist/chunks/keycloak-t6JEUeOz.js.map +0 -1
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { S as ProviderError, a as ConfigurationError, b as NetworkError, c as InvalidClientError, t as AccessDeniedError, u as InvalidGrantError, v as InvalidTokenError, x as NotImplementedError } from "./errors-RgVH84_1.js";
|
|
2
|
+
//#region src/shared/providers/github.ts
|
|
3
|
+
/**
|
|
4
|
+
* GitHub Provider - OAuth2 Authentication
|
|
5
|
+
*
|
|
6
|
+
* Implements OAuth2 authentication with GitHub.
|
|
7
|
+
* Note: GitHub does NOT support full OIDC (no id_token).
|
|
8
|
+
* User info must be fetched via GitHub API.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Generate a random string for state.
|
|
12
|
+
*/
|
|
13
|
+
function generateRandomString(length = 32) {
|
|
14
|
+
const array = new Uint8Array(length);
|
|
15
|
+
crypto.getRandomValues(array);
|
|
16
|
+
return Array.from(array, (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* GitHub authentication provider.
|
|
20
|
+
*
|
|
21
|
+
* Implements OAuth2 authentication with GitHub.
|
|
22
|
+
* Key differences from OIDC providers:
|
|
23
|
+
* - No ID token - user info fetched via API
|
|
24
|
+
* - No JWKS - tokens are opaque
|
|
25
|
+
* - No token introspection endpoint
|
|
26
|
+
*/
|
|
27
|
+
var GitHubProvider = class GitHubProvider {
|
|
28
|
+
options;
|
|
29
|
+
static AUTHORIZATION_URL = "https://github.com/login/oauth/authorize";
|
|
30
|
+
static TOKEN_URL = "https://github.com/login/oauth/access_token";
|
|
31
|
+
static API_URL = "https://api.github.com";
|
|
32
|
+
constructor(options) {
|
|
33
|
+
if (!options.clientId) throw new ConfigurationError("clientId is required", "github");
|
|
34
|
+
if (!options.clientSecret) throw new ConfigurationError("clientSecret is required", "github");
|
|
35
|
+
this.options = {
|
|
36
|
+
scopes: ["user:email", "read:user"],
|
|
37
|
+
timeout: 3e4,
|
|
38
|
+
maxRetries: 3,
|
|
39
|
+
...options
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Make an HTTP request to GitHub API with error handling.
|
|
44
|
+
*/
|
|
45
|
+
async request(url, options = {}, token) {
|
|
46
|
+
const headers = {
|
|
47
|
+
Accept: "application/json",
|
|
48
|
+
"User-Agent": "happyvertical-auth",
|
|
49
|
+
...this.options.headers,
|
|
50
|
+
...options.headers
|
|
51
|
+
};
|
|
52
|
+
if (token) headers.Authorization = `Bearer ${token}`;
|
|
53
|
+
try {
|
|
54
|
+
const response = await fetch(url, {
|
|
55
|
+
...options,
|
|
56
|
+
headers,
|
|
57
|
+
signal: AbortSignal.timeout(this.options.timeout || 3e4)
|
|
58
|
+
});
|
|
59
|
+
if (!response.ok) {
|
|
60
|
+
const errorBody = await response.text().catch(() => "");
|
|
61
|
+
let errorData = {};
|
|
62
|
+
try {
|
|
63
|
+
errorData = JSON.parse(errorBody);
|
|
64
|
+
} catch {}
|
|
65
|
+
this.handleHttpError(response.status, errorData, errorBody);
|
|
66
|
+
}
|
|
67
|
+
const text = await response.text();
|
|
68
|
+
if (!text) return {};
|
|
69
|
+
return JSON.parse(text);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
if (error instanceof Error && error.name === "TimeoutError") throw new NetworkError("Request timed out", "github", error);
|
|
72
|
+
if (error instanceof AccessDeniedError || error instanceof InvalidGrantError || error instanceof InvalidClientError || error instanceof ProviderError) throw error;
|
|
73
|
+
throw new NetworkError(`Network error: ${error instanceof Error ? error.message : "Unknown error"}`, "github", error instanceof Error ? error : void 0);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Handle HTTP error responses.
|
|
78
|
+
*/
|
|
79
|
+
handleHttpError(status, data, rawBody) {
|
|
80
|
+
const error = data.error;
|
|
81
|
+
const errorDescription = data.error_description || data.message || rawBody;
|
|
82
|
+
switch (status) {
|
|
83
|
+
case 400:
|
|
84
|
+
if (error === "bad_verification_code") throw new InvalidGrantError("Invalid or expired code", "github");
|
|
85
|
+
throw new ProviderError(`Bad request: ${errorDescription}`, "github");
|
|
86
|
+
case 401: throw new InvalidClientError("github");
|
|
87
|
+
case 403: throw new AccessDeniedError(errorDescription, "github");
|
|
88
|
+
default: throw new ProviderError(`GitHub error (${status}): ${errorDescription}`, "github");
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Fetch user info from GitHub API.
|
|
93
|
+
*/
|
|
94
|
+
async fetchUser(token) {
|
|
95
|
+
return this.request(`${GitHubProvider.API_URL}/user`, { method: "GET" }, token);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Fetch user emails from GitHub API.
|
|
99
|
+
*/
|
|
100
|
+
async fetchEmails(token) {
|
|
101
|
+
return this.request(`${GitHubProvider.API_URL}/user/emails`, { method: "GET" }, token);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Get the primary verified email for a user.
|
|
105
|
+
*/
|
|
106
|
+
async getPrimaryEmail(token) {
|
|
107
|
+
try {
|
|
108
|
+
return (await this.fetchEmails(token)).find((e) => e.primary && e.verified)?.email;
|
|
109
|
+
} catch {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
async getAuthorizationUrl(options) {
|
|
114
|
+
const state = options?.state || generateRandomString();
|
|
115
|
+
const scopes = options?.scopes || this.options.scopes || ["user:email", "read:user"];
|
|
116
|
+
const redirectUri = options?.redirectUri || this.options.redirectUri;
|
|
117
|
+
if (!redirectUri) throw new ConfigurationError("redirectUri is required", "github");
|
|
118
|
+
const params = new URLSearchParams({
|
|
119
|
+
client_id: this.options.clientId,
|
|
120
|
+
redirect_uri: redirectUri,
|
|
121
|
+
scope: scopes.join(" "),
|
|
122
|
+
state
|
|
123
|
+
});
|
|
124
|
+
if (options?.loginHint) params.set("login", options.loginHint);
|
|
125
|
+
const nonce = options?.nonce || generateRandomString();
|
|
126
|
+
if (options?.extraParams) for (const [key, value] of Object.entries(options.extraParams)) params.set(key, value);
|
|
127
|
+
return {
|
|
128
|
+
url: `${GitHubProvider.AUTHORIZATION_URL}?${params.toString()}`,
|
|
129
|
+
state,
|
|
130
|
+
nonce,
|
|
131
|
+
codeVerifier: void 0
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
async exchangeCode(params) {
|
|
135
|
+
const redirectUri = params.redirectUri || this.options.redirectUri;
|
|
136
|
+
const body = new URLSearchParams({
|
|
137
|
+
client_id: this.options.clientId,
|
|
138
|
+
client_secret: this.options.clientSecret,
|
|
139
|
+
code: params.code
|
|
140
|
+
});
|
|
141
|
+
if (redirectUri) body.set("redirect_uri", redirectUri);
|
|
142
|
+
const data = await (await fetch(GitHubProvider.TOKEN_URL, {
|
|
143
|
+
method: "POST",
|
|
144
|
+
headers: {
|
|
145
|
+
Accept: "application/json",
|
|
146
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
147
|
+
},
|
|
148
|
+
body: body.toString(),
|
|
149
|
+
signal: AbortSignal.timeout(this.options.timeout || 3e4)
|
|
150
|
+
})).json();
|
|
151
|
+
if (data.error) {
|
|
152
|
+
if (data.error === "bad_verification_code") throw new InvalidGrantError(data.error_description || "Invalid or expired code", "github");
|
|
153
|
+
throw new ProviderError(data.error_description || data.error, "github");
|
|
154
|
+
}
|
|
155
|
+
if (!data.access_token) throw new ProviderError("No access token received", "github");
|
|
156
|
+
const user = await this.fetchUser(data.access_token);
|
|
157
|
+
return {
|
|
158
|
+
accessToken: data.access_token,
|
|
159
|
+
tokenType: data.token_type || "Bearer",
|
|
160
|
+
expiresIn: 0,
|
|
161
|
+
scope: data.scope,
|
|
162
|
+
userId: user.id.toString()
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
async authenticate(_credentials) {
|
|
166
|
+
throw new NotImplementedError("authenticate", "github", { reason: "GitHub only supports authorization code flow. Use getAuthorizationUrl() and exchangeCode() instead." });
|
|
167
|
+
}
|
|
168
|
+
async refresh(_refreshToken) {
|
|
169
|
+
throw new NotImplementedError("refresh", "github", { reason: "GitHub OAuth tokens do not expire and cannot be refreshed. For expiring tokens, use GitHub Apps instead." });
|
|
170
|
+
}
|
|
171
|
+
async logout(options) {
|
|
172
|
+
if (options?.token) try {
|
|
173
|
+
await fetch(`${GitHubProvider.API_URL}/applications/${this.options.clientId}/token`, {
|
|
174
|
+
method: "DELETE",
|
|
175
|
+
headers: {
|
|
176
|
+
Accept: "application/json",
|
|
177
|
+
Authorization: `Basic ${btoa(`${this.options.clientId}:${this.options.clientSecret}`)}`,
|
|
178
|
+
"Content-Type": "application/json"
|
|
179
|
+
},
|
|
180
|
+
body: JSON.stringify({ access_token: options.token })
|
|
181
|
+
});
|
|
182
|
+
} catch {}
|
|
183
|
+
}
|
|
184
|
+
async validateToken(token, _options) {
|
|
185
|
+
try {
|
|
186
|
+
const user = await this.fetchUser(token);
|
|
187
|
+
const email = await this.getPrimaryEmail(token);
|
|
188
|
+
return {
|
|
189
|
+
sub: user.id.toString(),
|
|
190
|
+
iss: "https://github.com",
|
|
191
|
+
aud: this.options.clientId,
|
|
192
|
+
exp: 0,
|
|
193
|
+
iat: Math.floor(Date.now() / 1e3),
|
|
194
|
+
email,
|
|
195
|
+
email_verified: email ? true : void 0,
|
|
196
|
+
preferred_username: user.login,
|
|
197
|
+
name: user.name || void 0,
|
|
198
|
+
picture: user.avatar_url,
|
|
199
|
+
login: user.login,
|
|
200
|
+
html_url: user.html_url,
|
|
201
|
+
company: user.company,
|
|
202
|
+
location: user.location,
|
|
203
|
+
bio: user.bio
|
|
204
|
+
};
|
|
205
|
+
} catch {
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
decodeToken(_token) {
|
|
210
|
+
throw new InvalidTokenError("GitHub tokens are opaque and cannot be decoded", "github");
|
|
211
|
+
}
|
|
212
|
+
async introspectToken(token) {
|
|
213
|
+
const claims = await this.validateToken(token);
|
|
214
|
+
return {
|
|
215
|
+
active: claims !== null,
|
|
216
|
+
claims: claims || void 0
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
async getProfile(tokenOrSession) {
|
|
220
|
+
const user = await this.fetchUser(tokenOrSession);
|
|
221
|
+
const email = await this.getPrimaryEmail(tokenOrSession);
|
|
222
|
+
return {
|
|
223
|
+
id: user.id.toString(),
|
|
224
|
+
username: user.login,
|
|
225
|
+
email,
|
|
226
|
+
emailVerified: email ? true : void 0,
|
|
227
|
+
displayName: user.name || user.login,
|
|
228
|
+
picture: user.avatar_url,
|
|
229
|
+
attributes: {
|
|
230
|
+
html_url: user.html_url,
|
|
231
|
+
company: user.company || "",
|
|
232
|
+
blog: user.blog || "",
|
|
233
|
+
location: user.location || "",
|
|
234
|
+
bio: user.bio || "",
|
|
235
|
+
twitter_username: user.twitter_username || ""
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
async updateProfile(_tokenOrSession, _profile) {
|
|
240
|
+
throw new NotImplementedError("updateProfile", "github", { reason: "GitHub does not support profile updates via OAuth2" });
|
|
241
|
+
}
|
|
242
|
+
async getUser(_userId, _adminToken) {
|
|
243
|
+
throw new NotImplementedError("getUser", "github", { reason: "GitHub does not expose admin user management" });
|
|
244
|
+
}
|
|
245
|
+
async createUser(_user, _adminToken) {
|
|
246
|
+
throw new NotImplementedError("createUser", "github", { reason: "GitHub does not expose user creation" });
|
|
247
|
+
}
|
|
248
|
+
async updateUser(_userId, _updates, _adminToken) {
|
|
249
|
+
throw new NotImplementedError("updateUser", "github", { reason: "GitHub does not expose user management" });
|
|
250
|
+
}
|
|
251
|
+
async deleteUser(_userId, _adminToken) {
|
|
252
|
+
throw new NotImplementedError("deleteUser", "github", { reason: "GitHub does not expose user management" });
|
|
253
|
+
}
|
|
254
|
+
async listUsers(_query, _adminToken) {
|
|
255
|
+
throw new NotImplementedError("listUsers", "github", { reason: "GitHub does not expose user listing" });
|
|
256
|
+
}
|
|
257
|
+
async requestPasswordReset(_email) {
|
|
258
|
+
throw new NotImplementedError("requestPasswordReset", "github", { reason: "Password management is handled by GitHub" });
|
|
259
|
+
}
|
|
260
|
+
async resetPassword(_token, _newPassword) {
|
|
261
|
+
throw new NotImplementedError("resetPassword", "github", { reason: "Password management is handled by GitHub" });
|
|
262
|
+
}
|
|
263
|
+
async listSessions(_userId, _adminToken) {
|
|
264
|
+
throw new NotImplementedError("listSessions", "github", { reason: "Session management is handled by GitHub" });
|
|
265
|
+
}
|
|
266
|
+
async revokeSession(_sessionId, _adminToken) {
|
|
267
|
+
throw new NotImplementedError("revokeSession", "github", { reason: "Session management is handled by GitHub" });
|
|
268
|
+
}
|
|
269
|
+
async revokeAllSessions(_userId, _adminToken) {
|
|
270
|
+
throw new NotImplementedError("revokeAllSessions", "github", { reason: "Session management is handled by GitHub" });
|
|
271
|
+
}
|
|
272
|
+
async hasRole(_tokenOrUserId, _role) {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
async hasPermission(_tokenOrUserId, _permission, _resource) {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
async getRoles(_tokenOrUserId, _adminToken) {
|
|
279
|
+
return [];
|
|
280
|
+
}
|
|
281
|
+
async assignRole(_userId, _role, _adminToken) {
|
|
282
|
+
throw new NotImplementedError("assignRole", "github", { reason: "GitHub does not support role management" });
|
|
283
|
+
}
|
|
284
|
+
async removeRole(_userId, _role, _adminToken) {
|
|
285
|
+
throw new NotImplementedError("removeRole", "github", { reason: "GitHub does not support role management" });
|
|
286
|
+
}
|
|
287
|
+
async getCapabilities() {
|
|
288
|
+
return {
|
|
289
|
+
authorizationCode: true,
|
|
290
|
+
passwordGrant: false,
|
|
291
|
+
clientCredentials: false,
|
|
292
|
+
tokenRefresh: false,
|
|
293
|
+
oidc: false,
|
|
294
|
+
userManagement: false,
|
|
295
|
+
sessionManagement: false,
|
|
296
|
+
rbac: false,
|
|
297
|
+
passwordReset: false,
|
|
298
|
+
mfa: true,
|
|
299
|
+
socialLogin: true,
|
|
300
|
+
federation: false,
|
|
301
|
+
decentralized: false
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
async getDiscoveryDocument() {
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
//#endregion
|
|
309
|
+
export { GitHubProvider };
|
|
310
|
+
|
|
311
|
+
//# sourceMappingURL=github-uNnnVjFZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-uNnnVjFZ.js","names":[],"sources":["../../src/shared/providers/github.ts"],"sourcesContent":["/**\n * GitHub Provider - OAuth2 Authentication\n *\n * Implements OAuth2 authentication with GitHub.\n * Note: GitHub does NOT support full OIDC (no id_token).\n * User info must be fetched via GitHub API.\n */\n\nimport {\n AccessDeniedError,\n ConfigurationError,\n InvalidClientError,\n InvalidGrantError,\n InvalidTokenError,\n NetworkError,\n NotImplementedError,\n ProviderError,\n} from '../errors.js';\nimport type {\n AuthCapabilities,\n AuthCredentials,\n AuthInterface,\n AuthorizationOptions,\n AuthorizationResult,\n AuthResult,\n CodeExchangeParams,\n CreateUserRequest,\n GitHubOptions,\n LogoutOptions,\n OIDCDiscoveryDocument,\n Session,\n TokenClaims,\n TokenIntrospection,\n TokenPayload,\n TokenValidationOptions,\n UserListResult,\n UserProfile,\n UserQuery,\n} from '../types.js';\n\n/**\n * Generate a random string for state.\n */\nfunction generateRandomString(length = 32): string {\n const array = new Uint8Array(length);\n crypto.getRandomValues(array);\n return Array.from(array, (byte) => byte.toString(16).padStart(2, '0')).join(\n '',\n );\n}\n\n/**\n * GitHub user response from API.\n */\ninterface GitHubUser {\n id: number;\n login: string;\n name: string | null;\n email: string | null;\n avatar_url: string;\n html_url: string;\n company: string | null;\n blog: string | null;\n location: string | null;\n bio: string | null;\n twitter_username: string | null;\n created_at: string;\n updated_at: string;\n}\n\n/**\n * GitHub email response from API.\n */\ninterface GitHubEmail {\n email: string;\n primary: boolean;\n verified: boolean;\n visibility: string | null;\n}\n\n/**\n * GitHub authentication provider.\n *\n * Implements OAuth2 authentication with GitHub.\n * Key differences from OIDC providers:\n * - No ID token - user info fetched via API\n * - No JWKS - tokens are opaque\n * - No token introspection endpoint\n */\nexport class GitHubProvider implements AuthInterface {\n private options: Required<Pick<GitHubOptions, 'clientId'>> & GitHubOptions;\n\n private static readonly AUTHORIZATION_URL =\n 'https://github.com/login/oauth/authorize';\n private static readonly TOKEN_URL =\n 'https://github.com/login/oauth/access_token';\n private static readonly API_URL = 'https://api.github.com';\n\n constructor(options: GitHubOptions) {\n if (!options.clientId) {\n throw new ConfigurationError('clientId is required', 'github');\n }\n if (!options.clientSecret) {\n throw new ConfigurationError('clientSecret is required', 'github');\n }\n\n this.options = {\n scopes: ['user:email', 'read:user'],\n timeout: 30000,\n maxRetries: 3,\n ...options,\n };\n }\n\n // ---------------------------------------------------------------------------\n // INTERNAL HELPERS\n // ---------------------------------------------------------------------------\n\n /**\n * Make an HTTP request to GitHub API with error handling.\n */\n private async request<T>(\n url: string,\n options: RequestInit = {},\n token?: string,\n ): Promise<T> {\n const headers: Record<string, string> = {\n Accept: 'application/json',\n 'User-Agent': 'happyvertical-auth',\n ...this.options.headers,\n ...(options.headers as Record<string, string>),\n };\n\n if (token) {\n headers.Authorization = `Bearer ${token}`;\n }\n\n try {\n const response = await fetch(url, {\n ...options,\n headers,\n signal: AbortSignal.timeout(this.options.timeout || 30000),\n });\n\n if (!response.ok) {\n const errorBody = await response.text().catch(() => '');\n let errorData: Record<string, unknown> = {};\n try {\n errorData = JSON.parse(errorBody);\n } catch {\n // Not JSON\n }\n\n this.handleHttpError(response.status, errorData, errorBody);\n }\n\n const text = await response.text();\n if (!text) return {} as T;\n return JSON.parse(text) as T;\n } catch (error) {\n if (error instanceof Error && error.name === 'TimeoutError') {\n throw new NetworkError('Request timed out', 'github', error);\n }\n if (\n error instanceof AccessDeniedError ||\n error instanceof InvalidGrantError ||\n error instanceof InvalidClientError ||\n error instanceof ProviderError\n ) {\n throw error;\n }\n throw new NetworkError(\n `Network error: ${error instanceof Error ? error.message : 'Unknown error'}`,\n 'github',\n error instanceof Error ? error : undefined,\n );\n }\n }\n\n /**\n * Handle HTTP error responses.\n */\n private handleHttpError(\n status: number,\n data: Record<string, unknown>,\n rawBody: string,\n ): never {\n const error = data.error as string | undefined;\n const errorDescription = data.error_description || data.message || rawBody;\n\n switch (status) {\n case 400:\n if (error === 'bad_verification_code') {\n throw new InvalidGrantError('Invalid or expired code', 'github');\n }\n throw new ProviderError(`Bad request: ${errorDescription}`, 'github');\n\n case 401:\n throw new InvalidClientError('github');\n\n case 403:\n throw new AccessDeniedError(errorDescription as string, 'github');\n\n default:\n throw new ProviderError(\n `GitHub error (${status}): ${errorDescription}`,\n 'github',\n );\n }\n }\n\n /**\n * Fetch user info from GitHub API.\n */\n private async fetchUser(token: string): Promise<GitHubUser> {\n return this.request<GitHubUser>(\n `${GitHubProvider.API_URL}/user`,\n { method: 'GET' },\n token,\n );\n }\n\n /**\n * Fetch user emails from GitHub API.\n */\n private async fetchEmails(token: string): Promise<GitHubEmail[]> {\n return this.request<GitHubEmail[]>(\n `${GitHubProvider.API_URL}/user/emails`,\n { method: 'GET' },\n token,\n );\n }\n\n /**\n * Get the primary verified email for a user.\n */\n private async getPrimaryEmail(token: string): Promise<string | undefined> {\n try {\n const emails = await this.fetchEmails(token);\n const primary = emails.find((e) => e.primary && e.verified);\n return primary?.email;\n } catch {\n // Email scope may not be granted\n return undefined;\n }\n }\n\n // ---------------------------------------------------------------------------\n // AUTHENTICATION FLOWS\n // ---------------------------------------------------------------------------\n\n async getAuthorizationUrl(\n options?: AuthorizationOptions,\n ): Promise<AuthorizationResult> {\n const state = options?.state || generateRandomString();\n const scopes = options?.scopes ||\n this.options.scopes || ['user:email', 'read:user'];\n const redirectUri = options?.redirectUri || this.options.redirectUri;\n\n if (!redirectUri) {\n throw new ConfigurationError('redirectUri is required', 'github');\n }\n\n const params = new URLSearchParams({\n client_id: this.options.clientId,\n redirect_uri: redirectUri,\n scope: scopes.join(' '),\n state,\n });\n\n if (options?.loginHint) {\n params.set('login', options.loginHint);\n }\n\n // GitHub doesn't support PKCE for OAuth apps (only GitHub Apps)\n // But we can still pass nonce for state management\n const nonce = options?.nonce || generateRandomString();\n\n // Add extra params\n if (options?.extraParams) {\n for (const [key, value] of Object.entries(options.extraParams)) {\n params.set(key, value);\n }\n }\n\n const url = `${GitHubProvider.AUTHORIZATION_URL}?${params.toString()}`;\n\n return {\n url,\n state,\n nonce,\n // GitHub OAuth doesn't use PKCE\n codeVerifier: undefined,\n };\n }\n\n async exchangeCode(params: CodeExchangeParams): Promise<AuthResult> {\n const redirectUri = params.redirectUri || this.options.redirectUri;\n\n const body = new URLSearchParams({\n client_id: this.options.clientId,\n client_secret: this.options.clientSecret!,\n code: params.code,\n });\n\n if (redirectUri) {\n body.set('redirect_uri', redirectUri);\n }\n\n // GitHub token endpoint requires Accept: application/json\n const response = await fetch(GitHubProvider.TOKEN_URL, {\n method: 'POST',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body: body.toString(),\n signal: AbortSignal.timeout(this.options.timeout || 30000),\n });\n\n const data = (await response.json()) as {\n access_token?: string;\n token_type?: string;\n scope?: string;\n error?: string;\n error_description?: string;\n };\n\n if (data.error) {\n if (data.error === 'bad_verification_code') {\n throw new InvalidGrantError(\n data.error_description || 'Invalid or expired code',\n 'github',\n );\n }\n throw new ProviderError(data.error_description || data.error, 'github');\n }\n\n if (!data.access_token) {\n throw new ProviderError('No access token received', 'github');\n }\n\n // Fetch user info to get user ID\n const user = await this.fetchUser(data.access_token);\n\n return {\n accessToken: data.access_token,\n tokenType: data.token_type || 'Bearer',\n expiresIn: 0, // GitHub tokens don't expire by default\n scope: data.scope,\n userId: user.id.toString(),\n // GitHub doesn't return refresh tokens or ID tokens\n };\n }\n\n async authenticate(_credentials: AuthCredentials): Promise<AuthResult> {\n throw new NotImplementedError('authenticate', 'github', {\n reason:\n 'GitHub only supports authorization code flow. Use getAuthorizationUrl() and exchangeCode() instead.',\n });\n }\n\n async refresh(_refreshToken: string): Promise<AuthResult> {\n throw new NotImplementedError('refresh', 'github', {\n reason:\n 'GitHub OAuth tokens do not expire and cannot be refreshed. For expiring tokens, use GitHub Apps instead.',\n });\n }\n\n async logout(options?: LogoutOptions): Promise<void> {\n // GitHub doesn't have a token revocation endpoint for OAuth apps\n // The user must revoke access via GitHub settings\n if (options?.token) {\n // Best effort: try to revoke via GitHub Apps API (won't work for OAuth apps)\n try {\n await fetch(\n `${GitHubProvider.API_URL}/applications/${this.options.clientId}/token`,\n {\n method: 'DELETE',\n headers: {\n Accept: 'application/json',\n Authorization: `Basic ${btoa(`${this.options.clientId}:${this.options.clientSecret}`)}`,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ access_token: options.token }),\n },\n );\n } catch {\n // Ignore - revocation may not be supported\n }\n }\n }\n\n // ---------------------------------------------------------------------------\n // TOKEN OPERATIONS\n // ---------------------------------------------------------------------------\n\n async validateToken(\n token: string,\n _options?: TokenValidationOptions,\n ): Promise<TokenClaims | null> {\n // GitHub tokens are opaque - validate by calling the API\n try {\n const user = await this.fetchUser(token);\n const email = await this.getPrimaryEmail(token);\n\n // Synthesize OIDC-like claims from GitHub user data\n return {\n sub: user.id.toString(),\n iss: 'https://github.com',\n aud: this.options.clientId,\n exp: 0, // GitHub tokens don't expire\n iat: Math.floor(Date.now() / 1000),\n email,\n email_verified: email ? true : undefined,\n preferred_username: user.login,\n name: user.name || undefined,\n picture: user.avatar_url,\n // GitHub-specific claims\n login: user.login,\n html_url: user.html_url,\n company: user.company,\n location: user.location,\n bio: user.bio,\n };\n } catch {\n return null;\n }\n }\n\n decodeToken(_token: string): TokenPayload {\n // GitHub tokens are opaque, not JWTs\n throw new InvalidTokenError(\n 'GitHub tokens are opaque and cannot be decoded',\n 'github',\n );\n }\n\n async introspectToken(token: string): Promise<TokenIntrospection> {\n const claims = await this.validateToken(token);\n return {\n active: claims !== null,\n claims: claims || undefined,\n };\n }\n\n // ---------------------------------------------------------------------------\n // USER OPERATIONS\n // ---------------------------------------------------------------------------\n\n async getProfile(tokenOrSession: string): Promise<UserProfile> {\n const user = await this.fetchUser(tokenOrSession);\n const email = await this.getPrimaryEmail(tokenOrSession);\n\n return {\n id: user.id.toString(),\n username: user.login,\n email,\n emailVerified: email ? true : undefined,\n displayName: user.name || user.login,\n picture: user.avatar_url,\n attributes: {\n html_url: user.html_url,\n company: user.company || '',\n blog: user.blog || '',\n location: user.location || '',\n bio: user.bio || '',\n twitter_username: user.twitter_username || '',\n },\n };\n }\n\n async updateProfile(\n _tokenOrSession: string,\n _profile: Partial<UserProfile>,\n ): Promise<UserProfile> {\n throw new NotImplementedError('updateProfile', 'github', {\n reason: 'GitHub does not support profile updates via OAuth2',\n });\n }\n\n async getUser(_userId: string, _adminToken?: string): Promise<UserProfile> {\n throw new NotImplementedError('getUser', 'github', {\n reason: 'GitHub does not expose admin user management',\n });\n }\n\n async createUser(\n _user: CreateUserRequest,\n _adminToken: string,\n ): Promise<UserProfile> {\n throw new NotImplementedError('createUser', 'github', {\n reason: 'GitHub does not expose user creation',\n });\n }\n\n async updateUser(\n _userId: string,\n _updates: Partial<CreateUserRequest>,\n _adminToken: string,\n ): Promise<UserProfile> {\n throw new NotImplementedError('updateUser', 'github', {\n reason: 'GitHub does not expose user management',\n });\n }\n\n async deleteUser(_userId: string, _adminToken: string): Promise<void> {\n throw new NotImplementedError('deleteUser', 'github', {\n reason: 'GitHub does not expose user management',\n });\n }\n\n async listUsers(\n _query: UserQuery,\n _adminToken?: string,\n ): Promise<UserListResult> {\n throw new NotImplementedError('listUsers', 'github', {\n reason: 'GitHub does not expose user listing',\n });\n }\n\n async requestPasswordReset(_email: string): Promise<void> {\n throw new NotImplementedError('requestPasswordReset', 'github', {\n reason: 'Password management is handled by GitHub',\n });\n }\n\n async resetPassword(_token: string, _newPassword: string): Promise<void> {\n throw new NotImplementedError('resetPassword', 'github', {\n reason: 'Password management is handled by GitHub',\n });\n }\n\n // ---------------------------------------------------------------------------\n // SESSION OPERATIONS\n // ---------------------------------------------------------------------------\n\n async listSessions(\n _userId: string,\n _adminToken?: string,\n ): Promise<Session[]> {\n throw new NotImplementedError('listSessions', 'github', {\n reason: 'Session management is handled by GitHub',\n });\n }\n\n async revokeSession(_sessionId: string, _adminToken?: string): Promise<void> {\n throw new NotImplementedError('revokeSession', 'github', {\n reason: 'Session management is handled by GitHub',\n });\n }\n\n async revokeAllSessions(\n _userId: string,\n _adminToken?: string,\n ): Promise<void> {\n throw new NotImplementedError('revokeAllSessions', 'github', {\n reason: 'Session management is handled by GitHub',\n });\n }\n\n // ---------------------------------------------------------------------------\n // AUTHORIZATION\n // ---------------------------------------------------------------------------\n\n async hasRole(_tokenOrUserId: string, _role: string): Promise<boolean> {\n return false;\n }\n\n async hasPermission(\n _tokenOrUserId: string,\n _permission: string,\n _resource?: string,\n ): Promise<boolean> {\n return false;\n }\n\n async getRoles(\n _tokenOrUserId: string,\n _adminToken?: string,\n ): Promise<string[]> {\n return [];\n }\n\n async assignRole(\n _userId: string,\n _role: string,\n _adminToken: string,\n ): Promise<void> {\n throw new NotImplementedError('assignRole', 'github', {\n reason: 'GitHub does not support role management',\n });\n }\n\n async removeRole(\n _userId: string,\n _role: string,\n _adminToken: string,\n ): Promise<void> {\n throw new NotImplementedError('removeRole', 'github', {\n reason: 'GitHub does not support role management',\n });\n }\n\n // ---------------------------------------------------------------------------\n // PROVIDER INFORMATION\n // ---------------------------------------------------------------------------\n\n async getCapabilities(): Promise<AuthCapabilities> {\n return {\n authorizationCode: true,\n passwordGrant: false,\n clientCredentials: false,\n tokenRefresh: false, // GitHub OAuth tokens don't expire\n oidc: false, // GitHub is OAuth2, not OIDC\n userManagement: false,\n sessionManagement: false,\n rbac: false,\n passwordReset: false,\n mfa: true, // GitHub supports 2FA\n socialLogin: true,\n federation: false,\n decentralized: false,\n };\n }\n\n async getDiscoveryDocument(): Promise<OIDCDiscoveryDocument | null> {\n // GitHub doesn't have OIDC discovery\n return null;\n }\n}\n"],"mappings":";;;;;;;;;;;;AA2CA,SAAS,qBAAqB,SAAS,IAAY;CACjD,MAAM,QAAQ,IAAI,WAAW,MAAM;CACnC,OAAO,gBAAgB,KAAK;CAC5B,OAAO,MAAM,KAAK,QAAQ,SAAS,KAAK,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KACrE,EACF;AACF;;;;;;;;;;AAwCA,IAAa,iBAAb,MAAa,eAAwC;CACnD;CAEA,OAAwB,oBACtB;CACF,OAAwB,YACtB;CACF,OAAwB,UAAU;CAElC,YAAY,SAAwB;EAClC,IAAI,CAAC,QAAQ,UACX,MAAM,IAAI,mBAAmB,wBAAwB,QAAQ;EAE/D,IAAI,CAAC,QAAQ,cACX,MAAM,IAAI,mBAAmB,4BAA4B,QAAQ;EAGnE,KAAK,UAAU;GACb,QAAQ,CAAC,cAAc,WAAW;GAClC,SAAS;GACT,YAAY;GACZ,GAAG;EACL;CACF;;;;CASA,MAAc,QACZ,KACA,UAAuB,CAAC,GACxB,OACY;EACZ,MAAM,UAAkC;GACtC,QAAQ;GACR,cAAc;GACd,GAAG,KAAK,QAAQ;GAChB,GAAI,QAAQ;EACd;EAEA,IAAI,OACF,QAAQ,gBAAgB,UAAU;EAGpC,IAAI;GACF,MAAM,WAAW,MAAM,MAAM,KAAK;IAChC,GAAG;IACH;IACA,QAAQ,YAAY,QAAQ,KAAK,QAAQ,WAAW,GAAK;GAC3D,CAAC;GAED,IAAI,CAAC,SAAS,IAAI;IAChB,MAAM,YAAY,MAAM,SAAS,KAAK,CAAC,CAAC,YAAY,EAAE;IACtD,IAAI,YAAqC,CAAC;IAC1C,IAAI;KACF,YAAY,KAAK,MAAM,SAAS;IAClC,QAAQ,CAER;IAEA,KAAK,gBAAgB,SAAS,QAAQ,WAAW,SAAS;GAC5D;G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