@aura-stack/auth 0.1.0-rc.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/LICENSE +21 -0
- package/README.md +42 -0
- package/dist/@types/index.cjs +18 -0
- package/dist/@types/index.d.cts +9 -0
- package/dist/@types/index.d.ts +9 -0
- package/dist/@types/index.js +1 -0
- package/dist/@types/router.d.cjs +1 -0
- package/dist/@types/router.d.d.cts +16 -0
- package/dist/@types/router.d.d.ts +16 -0
- package/dist/@types/router.d.js +0 -0
- package/dist/@types/utility.cjs +18 -0
- package/dist/@types/utility.d.cts +6 -0
- package/dist/@types/utility.d.ts +6 -0
- package/dist/@types/utility.js +1 -0
- package/dist/actions/callback/access-token.cjs +170 -0
- package/dist/actions/callback/access-token.d.cts +30 -0
- package/dist/actions/callback/access-token.d.ts +30 -0
- package/dist/actions/callback/access-token.js +8 -0
- package/dist/actions/callback/callback.cjs +517 -0
- package/dist/actions/callback/callback.d.cts +13 -0
- package/dist/actions/callback/callback.d.ts +13 -0
- package/dist/actions/callback/callback.js +16 -0
- package/dist/actions/callback/userinfo.cjs +165 -0
- package/dist/actions/callback/userinfo.d.cts +22 -0
- package/dist/actions/callback/userinfo.d.ts +22 -0
- package/dist/actions/callback/userinfo.js +10 -0
- package/dist/actions/csrfToken/csrfToken.cjs +207 -0
- package/dist/actions/csrfToken/csrfToken.d.cts +5 -0
- package/dist/actions/csrfToken/csrfToken.d.ts +5 -0
- package/dist/actions/csrfToken/csrfToken.js +12 -0
- package/dist/actions/index.cjs +864 -0
- package/dist/actions/index.d.cts +14 -0
- package/dist/actions/index.d.ts +14 -0
- package/dist/actions/index.js +34 -0
- package/dist/actions/session/session.cjs +191 -0
- package/dist/actions/session/session.d.cts +5 -0
- package/dist/actions/session/session.d.ts +5 -0
- package/dist/actions/session/session.js +11 -0
- package/dist/actions/signIn/authorization.cjs +274 -0
- package/dist/actions/signIn/authorization.d.cts +45 -0
- package/dist/actions/signIn/authorization.d.ts +45 -0
- package/dist/actions/signIn/authorization.js +16 -0
- package/dist/actions/signIn/signIn.cjs +469 -0
- package/dist/actions/signIn/signIn.d.cts +13 -0
- package/dist/actions/signIn/signIn.d.ts +13 -0
- package/dist/actions/signIn/signIn.js +14 -0
- package/dist/actions/signOut/signOut.cjs +490 -0
- package/dist/actions/signOut/signOut.d.cts +8 -0
- package/dist/actions/signOut/signOut.d.ts +8 -0
- package/dist/actions/signOut/signOut.js +15 -0
- package/dist/assert.cjs +44 -0
- package/dist/assert.d.ts +5 -0
- package/dist/assert.js +10 -0
- package/dist/chunk-256KIVJL.js +99 -0
- package/dist/chunk-42XB3YCW.js +22 -0
- package/dist/chunk-6SM22VVJ.js +18 -0
- package/dist/chunk-CAKJT3KS.js +92 -0
- package/dist/chunk-E3OXBRYF.js +22 -0
- package/dist/chunk-EBPE35JT.js +31 -0
- package/dist/chunk-FIPU4MLT.js +21 -0
- package/dist/chunk-FJUDBLCP.js +59 -0
- package/dist/chunk-FKRDCWBF.js +22 -0
- package/dist/chunk-GZU3RBTB.js +62 -0
- package/dist/chunk-HGJ4TXY4.js +137 -0
- package/dist/chunk-HMRKN75I.js +74 -0
- package/dist/chunk-IKHPGFCW.js +14 -0
- package/dist/chunk-ITQ7352M.js +0 -0
- package/dist/chunk-JAPMIE6S.js +10 -0
- package/dist/chunk-KRNOMBXQ.js +22 -0
- package/dist/chunk-LLR722CL.js +96 -0
- package/dist/chunk-PG7UYFG5.js +0 -0
- package/dist/chunk-RLT4RFKV.js +45 -0
- package/dist/chunk-SJPDVKUS.js +112 -0
- package/dist/chunk-SMQO5WD7.js +30 -0
- package/dist/chunk-STHEPPUZ.js +11 -0
- package/dist/chunk-UJJ7R56J.js +52 -0
- package/dist/chunk-VFTYH33W.js +61 -0
- package/dist/chunk-X7M4CQTN.js +25 -0
- package/dist/chunk-XXJKNKGQ.js +37 -0
- package/dist/chunk-ZV4BH47P.js +154 -0
- package/dist/cookie.cjs +201 -0
- package/dist/cookie.d.ts +95 -0
- package/dist/cookie.js +36 -0
- package/dist/error.cjs +88 -0
- package/dist/error.d.ts +64 -0
- package/dist/error.js +16 -0
- package/dist/headers.cjs +35 -0
- package/dist/headers.d.ts +9 -0
- package/dist/headers.js +6 -0
- package/dist/index-CGRZ0wrw.d.ts +530 -0
- package/dist/index.cjs +1089 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +75 -0
- package/dist/jose.cjs +68 -0
- package/dist/jose.d.ts +20 -0
- package/dist/jose.js +9 -0
- package/dist/oauth/bitbucket.cjs +45 -0
- package/dist/oauth/bitbucket.d.cts +9 -0
- package/dist/oauth/bitbucket.d.ts +9 -0
- package/dist/oauth/bitbucket.js +6 -0
- package/dist/oauth/discord.cjs +55 -0
- package/dist/oauth/discord.d.cts +9 -0
- package/dist/oauth/discord.d.ts +9 -0
- package/dist/oauth/discord.js +6 -0
- package/dist/oauth/figma.cjs +46 -0
- package/dist/oauth/figma.d.cts +9 -0
- package/dist/oauth/figma.d.ts +9 -0
- package/dist/oauth/figma.js +6 -0
- package/dist/oauth/github.cjs +38 -0
- package/dist/oauth/github.d.cts +9 -0
- package/dist/oauth/github.d.ts +9 -0
- package/dist/oauth/github.js +6 -0
- package/dist/oauth/gitlab.cjs +46 -0
- package/dist/oauth/gitlab.d.cts +9 -0
- package/dist/oauth/gitlab.d.ts +9 -0
- package/dist/oauth/gitlab.js +6 -0
- package/dist/oauth/index.cjs +213 -0
- package/dist/oauth/index.d.cts +9 -0
- package/dist/oauth/index.d.ts +9 -0
- package/dist/oauth/index.js +36 -0
- package/dist/oauth/spotify.cjs +46 -0
- package/dist/oauth/spotify.d.cts +9 -0
- package/dist/oauth/spotify.d.ts +9 -0
- package/dist/oauth/spotify.js +6 -0
- package/dist/oauth/x.cjs +46 -0
- package/dist/oauth/x.d.cts +9 -0
- package/dist/oauth/x.d.ts +9 -0
- package/dist/oauth/x.js +6 -0
- package/dist/response.cjs +34 -0
- package/dist/response.d.ts +10 -0
- package/dist/response.js +6 -0
- package/dist/schemas.cjs +105 -0
- package/dist/schemas.d.ts +130 -0
- package/dist/schemas.js +20 -0
- package/dist/secure.cjs +120 -0
- package/dist/secure.d.ts +43 -0
- package/dist/secure.js +18 -0
- package/dist/utils.cjs +141 -0
- package/dist/utils.d.ts +45 -0
- package/dist/utils.js +23 -0
- package/package.json +70 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { JWTPayload } from '@aura-stack/jose/jose';
|
|
2
|
+
import * as _aura_stack_router from '@aura-stack/router';
|
|
3
|
+
import { c as AuthConfig } from './index-CGRZ0wrw.js';
|
|
4
|
+
import 'zod/v4';
|
|
5
|
+
import './jose.js';
|
|
6
|
+
import './schemas.js';
|
|
7
|
+
import 'zod/v4/core';
|
|
8
|
+
import 'cookie';
|
|
9
|
+
import './@types/utility.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Creates the authentication instance with the configuration provided for OAuth provider.
|
|
13
|
+
* > NOTE: The handlers returned by this function should be used in the server to handle the authentication routes
|
|
14
|
+
* and within the `/auth` base path
|
|
15
|
+
*
|
|
16
|
+
* @param authConfig - Authentication configuration including OAuth provider
|
|
17
|
+
* @returns Authentication instance with handlers to be used in the server
|
|
18
|
+
* @example
|
|
19
|
+
* const auth = createAuth({
|
|
20
|
+
* oauth: ["github", {
|
|
21
|
+
* id: "custom-oauth",
|
|
22
|
+
* name: "custom-oauth",
|
|
23
|
+
* authorizationURL: "https://custom-oauth.com/oauth/authorize",
|
|
24
|
+
* accessToken: "https://custom-oauth.com/oauth/token",
|
|
25
|
+
* scope: "profile email",
|
|
26
|
+
* responseType: "code",
|
|
27
|
+
* userInfo: "https://custom-oauth.com/api/userinfo",
|
|
28
|
+
* clientId: process.env.AURA_AUTH_CUSTOM_OAUTH_CLIENT_ID!,
|
|
29
|
+
* clientSecret: process.env.AURA_AUTH_CUSTOM_OAUTH_CLIENT_SECRET!,
|
|
30
|
+
* }]
|
|
31
|
+
* })
|
|
32
|
+
*/
|
|
33
|
+
declare const createAuth: (authConfig: AuthConfig) => {
|
|
34
|
+
handlers: _aura_stack_router.GetHttpHandlers<[_aura_stack_router.RouteEndpoint<"GET", "/signIn/:oauth", {}>, _aura_stack_router.RouteEndpoint<"GET", "/callback/:oauth", {}>, _aura_stack_router.RouteEndpoint<"GET", "/session", {}>, _aura_stack_router.RouteEndpoint<"POST", "/signOut", {}>, _aura_stack_router.RouteEndpoint<"GET", "/csrfToken", {}>]>;
|
|
35
|
+
jose: {
|
|
36
|
+
decodeJWT: (token: string) => Promise<JWTPayload>;
|
|
37
|
+
encodeJWT: (payload: JWTPayload) => Promise<string>;
|
|
38
|
+
signJWS: (payload: JWTPayload) => Promise<string>;
|
|
39
|
+
verifyJWS: (payload: string) => Promise<JWTPayload>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { createAuth };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createBuiltInOAuthProviders
|
|
3
|
+
} from "./chunk-VFTYH33W.js";
|
|
4
|
+
import "./chunk-FKRDCWBF.js";
|
|
5
|
+
import "./chunk-IKHPGFCW.js";
|
|
6
|
+
import "./chunk-KRNOMBXQ.js";
|
|
7
|
+
import "./chunk-E3OXBRYF.js";
|
|
8
|
+
import "./chunk-42XB3YCW.js";
|
|
9
|
+
import "./chunk-ITQ7352M.js";
|
|
10
|
+
import {
|
|
11
|
+
csrfTokenAction
|
|
12
|
+
} from "./chunk-SMQO5WD7.js";
|
|
13
|
+
import {
|
|
14
|
+
sessionAction
|
|
15
|
+
} from "./chunk-XXJKNKGQ.js";
|
|
16
|
+
import {
|
|
17
|
+
signInAction
|
|
18
|
+
} from "./chunk-LLR722CL.js";
|
|
19
|
+
import {
|
|
20
|
+
signOutAction
|
|
21
|
+
} from "./chunk-SJPDVKUS.js";
|
|
22
|
+
import "./chunk-CAKJT3KS.js";
|
|
23
|
+
import {
|
|
24
|
+
callbackAction
|
|
25
|
+
} from "./chunk-HGJ4TXY4.js";
|
|
26
|
+
import "./chunk-RLT4RFKV.js";
|
|
27
|
+
import "./chunk-UJJ7R56J.js";
|
|
28
|
+
import "./chunk-FIPU4MLT.js";
|
|
29
|
+
import "./chunk-EBPE35JT.js";
|
|
30
|
+
import {
|
|
31
|
+
defaultCookieConfig
|
|
32
|
+
} from "./chunk-ZV4BH47P.js";
|
|
33
|
+
import "./chunk-6SM22VVJ.js";
|
|
34
|
+
import "./chunk-STHEPPUZ.js";
|
|
35
|
+
import {
|
|
36
|
+
createJoseInstance
|
|
37
|
+
} from "./chunk-X7M4CQTN.js";
|
|
38
|
+
import "./chunk-GZU3RBTB.js";
|
|
39
|
+
import {
|
|
40
|
+
onErrorHandler
|
|
41
|
+
} from "./chunk-256KIVJL.js";
|
|
42
|
+
import "./chunk-FJUDBLCP.js";
|
|
43
|
+
import "./chunk-JAPMIE6S.js";
|
|
44
|
+
import "./chunk-HMRKN75I.js";
|
|
45
|
+
|
|
46
|
+
// src/index.ts
|
|
47
|
+
import "dotenv/config";
|
|
48
|
+
import { createRouter } from "@aura-stack/router";
|
|
49
|
+
var createInternalConfig = (authConfig) => {
|
|
50
|
+
return {
|
|
51
|
+
basePath: authConfig?.basePath ?? "/auth",
|
|
52
|
+
onError: onErrorHandler,
|
|
53
|
+
context: {
|
|
54
|
+
oauth: createBuiltInOAuthProviders(authConfig?.oauth),
|
|
55
|
+
cookies: authConfig?.cookies ?? defaultCookieConfig,
|
|
56
|
+
jose: createJoseInstance(authConfig?.secret),
|
|
57
|
+
basePath: authConfig?.basePath ?? "/auth",
|
|
58
|
+
trustedProxyHeaders: !!authConfig?.trustedProxyHeaders
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
var createAuth = (authConfig) => {
|
|
63
|
+
const config = createInternalConfig(authConfig);
|
|
64
|
+
const router = createRouter(
|
|
65
|
+
[signInAction(config.context.oauth), callbackAction(config.context.oauth), sessionAction, signOutAction, csrfTokenAction],
|
|
66
|
+
config
|
|
67
|
+
);
|
|
68
|
+
return {
|
|
69
|
+
handlers: router,
|
|
70
|
+
jose: config.context.jose
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
createAuth
|
|
75
|
+
};
|
package/dist/jose.cjs
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/jose.ts
|
|
31
|
+
var jose_exports = {};
|
|
32
|
+
__export(jose_exports, {
|
|
33
|
+
createJoseInstance: () => createJoseInstance
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(jose_exports);
|
|
36
|
+
var import_config = require("dotenv/config");
|
|
37
|
+
var import_jose = require("@aura-stack/jose");
|
|
38
|
+
|
|
39
|
+
// src/secure.ts
|
|
40
|
+
var import_node_crypto = __toESM(require("crypto"), 1);
|
|
41
|
+
|
|
42
|
+
// src/utils.ts
|
|
43
|
+
var import_router = require("@aura-stack/router");
|
|
44
|
+
|
|
45
|
+
// src/secure.ts
|
|
46
|
+
var createDerivedSalt = (secret) => {
|
|
47
|
+
return import_node_crypto.default.createHash("sha256").update(secret).update("aura-auth-salt").digest("hex");
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// src/jose.ts
|
|
51
|
+
var createJoseInstance = (secret) => {
|
|
52
|
+
secret ?? (secret = process.env.AURA_AUTH_SECRET);
|
|
53
|
+
const salt = process.env.AURA_AUTH_SALT ?? createDerivedSalt(secret);
|
|
54
|
+
const { derivedKey: derivedSessionKey } = (0, import_jose.createDeriveKey)(secret, salt, "session");
|
|
55
|
+
const { derivedKey: derivedCsrfTokenKey } = (0, import_jose.createDeriveKey)(secret, salt, "csrfToken");
|
|
56
|
+
const { decodeJWT, encodeJWT } = (0, import_jose.createJWT)(derivedSessionKey);
|
|
57
|
+
const { signJWS, verifyJWS } = (0, import_jose.createJWS)(derivedCsrfTokenKey);
|
|
58
|
+
return {
|
|
59
|
+
decodeJWT,
|
|
60
|
+
encodeJWT,
|
|
61
|
+
signJWS,
|
|
62
|
+
verifyJWS
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
createJoseInstance
|
|
68
|
+
});
|
package/dist/jose.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as _aura_stack_jose_jose from '@aura-stack/jose/jose';
|
|
2
|
+
export { JWTPayload } from '@aura-stack/jose/jose';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Creates the JOSE instance used for signing and verifying tokens. It derives keys
|
|
6
|
+
* for session tokens and CSRF tokens. For security and determinism, it uses the
|
|
7
|
+
* `AURA_AUTH_SALT` environment variable if available; otherwise,it uses a derived
|
|
8
|
+
* salt based on the provided secret.
|
|
9
|
+
*
|
|
10
|
+
* @param secret the base secret for key derivation
|
|
11
|
+
* @returns jose instance with methods for encoding/decoding JWTs and signing/verifying JWSs
|
|
12
|
+
*/
|
|
13
|
+
declare const createJoseInstance: (secret?: string) => {
|
|
14
|
+
decodeJWT: (token: string) => Promise<_aura_stack_jose_jose.JWTPayload>;
|
|
15
|
+
encodeJWT: (payload: _aura_stack_jose_jose.JWTPayload) => Promise<string>;
|
|
16
|
+
signJWS: (payload: _aura_stack_jose_jose.JWTPayload) => Promise<string>;
|
|
17
|
+
verifyJWS: (payload: string) => Promise<_aura_stack_jose_jose.JWTPayload>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { createJoseInstance };
|
package/dist/jose.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/oauth/bitbucket.ts
|
|
21
|
+
var bitbucket_exports = {};
|
|
22
|
+
__export(bitbucket_exports, {
|
|
23
|
+
bitbucket: () => bitbucket
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(bitbucket_exports);
|
|
26
|
+
var bitbucket = {
|
|
27
|
+
id: "bitbucket",
|
|
28
|
+
name: "Bitbucket",
|
|
29
|
+
authorizeURL: "https://bitbucket.org/site/oauth2/authorize",
|
|
30
|
+
accessToken: "https://bitbucket.org/site/oauth2/access_token",
|
|
31
|
+
userInfo: "https://api.bitbucket.org/2.0/user",
|
|
32
|
+
scope: "account email",
|
|
33
|
+
responseType: "code",
|
|
34
|
+
profile(profile) {
|
|
35
|
+
return {
|
|
36
|
+
sub: profile.uuid ?? profile.account_id,
|
|
37
|
+
name: profile.display_name ?? profile.nickname,
|
|
38
|
+
image: profile.links.avatar.href
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
44
|
+
bitbucket
|
|
45
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { B as BitbucketProfile, h as bitbucket } from '../index-B1vDUGwh.cjs';
|
|
2
|
+
import '../@types/utility.cjs';
|
|
3
|
+
import 'zod/v4';
|
|
4
|
+
import '../jose.cjs';
|
|
5
|
+
import '@aura-stack/jose/jose';
|
|
6
|
+
import '../schemas.cjs';
|
|
7
|
+
import 'zod/v4/core';
|
|
8
|
+
import '@aura-stack/router';
|
|
9
|
+
import 'cookie';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { B as BitbucketProfile, h as bitbucket } from '../index-CGRZ0wrw.js';
|
|
2
|
+
import '../@types/utility.js';
|
|
3
|
+
import 'zod/v4';
|
|
4
|
+
import '../jose.js';
|
|
5
|
+
import '@aura-stack/jose/jose';
|
|
6
|
+
import '../schemas.js';
|
|
7
|
+
import 'zod/v4/core';
|
|
8
|
+
import '@aura-stack/router';
|
|
9
|
+
import 'cookie';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/oauth/discord.ts
|
|
21
|
+
var discord_exports = {};
|
|
22
|
+
__export(discord_exports, {
|
|
23
|
+
discord: () => discord
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(discord_exports);
|
|
26
|
+
var discord = {
|
|
27
|
+
id: "discord",
|
|
28
|
+
name: "Discord",
|
|
29
|
+
authorizeURL: "https://discord.com/oauth2/authorize",
|
|
30
|
+
accessToken: "https://discord.com/api/oauth2/token",
|
|
31
|
+
userInfo: "https://discord.com/api/users/@me",
|
|
32
|
+
scope: "identify email",
|
|
33
|
+
responseType: "code",
|
|
34
|
+
profile(profile) {
|
|
35
|
+
let image = "";
|
|
36
|
+
if (profile.avatar === null) {
|
|
37
|
+
const index = profile.discriminator === "0" ? (BigInt(profile.id) >> 22n) % 6n : Number(profile.discriminator) % 5;
|
|
38
|
+
image = `https://cdn.discordapp.com/embed/avatars/${index}.png`;
|
|
39
|
+
} else {
|
|
40
|
+
const format = profile.avatar.startsWith("a_") ? "gif" : "png";
|
|
41
|
+
image = `https://cdn.discordapp.com/avatars/${profile.id}/${profile.avatar}.${format}`;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
sub: profile.id,
|
|
45
|
+
// https://discord.com/developers/docs/change-log#display-names
|
|
46
|
+
name: profile.global_name ?? profile.username,
|
|
47
|
+
email: profile.email ?? "",
|
|
48
|
+
image
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
+
0 && (module.exports = {
|
|
54
|
+
discord
|
|
55
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { D as DiscordProfile, N as Nameplate, e as discord } from '../index-B1vDUGwh.cjs';
|
|
2
|
+
import 'zod/v4';
|
|
3
|
+
import '../jose.cjs';
|
|
4
|
+
import '@aura-stack/jose/jose';
|
|
5
|
+
import '../schemas.cjs';
|
|
6
|
+
import 'zod/v4/core';
|
|
7
|
+
import '@aura-stack/router';
|
|
8
|
+
import 'cookie';
|
|
9
|
+
import '../@types/utility.cjs';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { D as DiscordProfile, N as Nameplate, e as discord } from '../index-CGRZ0wrw.js';
|
|
2
|
+
import 'zod/v4';
|
|
3
|
+
import '../jose.js';
|
|
4
|
+
import '@aura-stack/jose/jose';
|
|
5
|
+
import '../schemas.js';
|
|
6
|
+
import 'zod/v4/core';
|
|
7
|
+
import '@aura-stack/router';
|
|
8
|
+
import 'cookie';
|
|
9
|
+
import '../@types/utility.js';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/oauth/figma.ts
|
|
21
|
+
var figma_exports = {};
|
|
22
|
+
__export(figma_exports, {
|
|
23
|
+
figma: () => figma
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(figma_exports);
|
|
26
|
+
var figma = {
|
|
27
|
+
id: "figma",
|
|
28
|
+
name: "Figma",
|
|
29
|
+
authorizeURL: "https://www.figma.com/oauth",
|
|
30
|
+
accessToken: "https://api.figma.com/v1/oauth/token",
|
|
31
|
+
userInfo: "https://api.figma.com/v1/me",
|
|
32
|
+
scope: "current_user:read",
|
|
33
|
+
responseType: "code",
|
|
34
|
+
profile(profile) {
|
|
35
|
+
return {
|
|
36
|
+
sub: profile.id,
|
|
37
|
+
name: profile.handle,
|
|
38
|
+
email: profile.email,
|
|
39
|
+
image: profile.img_url
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
figma
|
|
46
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { F as FigmaProfile, f as figma } from '../index-B1vDUGwh.cjs';
|
|
2
|
+
import 'zod/v4';
|
|
3
|
+
import '../jose.cjs';
|
|
4
|
+
import '@aura-stack/jose/jose';
|
|
5
|
+
import '../schemas.cjs';
|
|
6
|
+
import 'zod/v4/core';
|
|
7
|
+
import '@aura-stack/router';
|
|
8
|
+
import 'cookie';
|
|
9
|
+
import '../@types/utility.cjs';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { F as FigmaProfile, f as figma } from '../index-CGRZ0wrw.js';
|
|
2
|
+
import 'zod/v4';
|
|
3
|
+
import '../jose.js';
|
|
4
|
+
import '@aura-stack/jose/jose';
|
|
5
|
+
import '../schemas.js';
|
|
6
|
+
import 'zod/v4/core';
|
|
7
|
+
import '@aura-stack/router';
|
|
8
|
+
import 'cookie';
|
|
9
|
+
import '../@types/utility.js';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/oauth/github.ts
|
|
21
|
+
var github_exports = {};
|
|
22
|
+
__export(github_exports, {
|
|
23
|
+
github: () => github
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(github_exports);
|
|
26
|
+
var github = {
|
|
27
|
+
id: "github",
|
|
28
|
+
name: "GitHub",
|
|
29
|
+
authorizeURL: "https://github.com/login/oauth/authorize",
|
|
30
|
+
accessToken: "https://github.com/login/oauth/access_token",
|
|
31
|
+
userInfo: "https://api.github.com/user",
|
|
32
|
+
scope: "read:user user:email",
|
|
33
|
+
responseType: "code"
|
|
34
|
+
};
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
github
|
|
38
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { i as GitHubProfile, j as github } from '../index-B1vDUGwh.cjs';
|
|
2
|
+
import 'zod/v4';
|
|
3
|
+
import '../jose.cjs';
|
|
4
|
+
import '@aura-stack/jose/jose';
|
|
5
|
+
import '../schemas.cjs';
|
|
6
|
+
import 'zod/v4/core';
|
|
7
|
+
import '@aura-stack/router';
|
|
8
|
+
import 'cookie';
|
|
9
|
+
import '../@types/utility.cjs';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { i as GitHubProfile, j as github } from '../index-CGRZ0wrw.js';
|
|
2
|
+
import 'zod/v4';
|
|
3
|
+
import '../jose.js';
|
|
4
|
+
import '@aura-stack/jose/jose';
|
|
5
|
+
import '../schemas.js';
|
|
6
|
+
import 'zod/v4/core';
|
|
7
|
+
import '@aura-stack/router';
|
|
8
|
+
import 'cookie';
|
|
9
|
+
import '../@types/utility.js';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/oauth/gitlab.ts
|
|
21
|
+
var gitlab_exports = {};
|
|
22
|
+
__export(gitlab_exports, {
|
|
23
|
+
gitlab: () => gitlab
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(gitlab_exports);
|
|
26
|
+
var gitlab = {
|
|
27
|
+
id: "gitlab",
|
|
28
|
+
name: "GitLab",
|
|
29
|
+
authorizeURL: "https://gitlab.com/oauth/authorize",
|
|
30
|
+
accessToken: "https://gitlab.com/oauth/token",
|
|
31
|
+
userInfo: "https://gitlab.com/api/v4/user",
|
|
32
|
+
scope: "read_user",
|
|
33
|
+
responseType: "code",
|
|
34
|
+
profile(profile) {
|
|
35
|
+
return {
|
|
36
|
+
sub: profile.id.toString(),
|
|
37
|
+
name: profile.name ?? profile.username,
|
|
38
|
+
email: profile.email,
|
|
39
|
+
avatar: profile.avatar_url
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
gitlab
|
|
46
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { G as GitLabProfile, g as gitlab } from '../index-B1vDUGwh.cjs';
|
|
2
|
+
import 'zod/v4';
|
|
3
|
+
import '../jose.cjs';
|
|
4
|
+
import '@aura-stack/jose/jose';
|
|
5
|
+
import '../schemas.cjs';
|
|
6
|
+
import 'zod/v4/core';
|
|
7
|
+
import '@aura-stack/router';
|
|
8
|
+
import 'cookie';
|
|
9
|
+
import '../@types/utility.cjs';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { G as GitLabProfile, g as gitlab } from '../index-CGRZ0wrw.js';
|
|
2
|
+
import 'zod/v4';
|
|
3
|
+
import '../jose.js';
|
|
4
|
+
import '@aura-stack/jose/jose';
|
|
5
|
+
import '../schemas.js';
|
|
6
|
+
import 'zod/v4/core';
|
|
7
|
+
import '@aura-stack/router';
|
|
8
|
+
import 'cookie';
|
|
9
|
+
import '../@types/utility.js';
|